You could make a pinion puller. Get a bolt and nut where the bolt is smaller then the shaft. Attach something to the nut so it reaches under the pinion and you can turn the bolt to pull off the pinion. The reason you may not want to use a screwdriver is because it could damage the internals/can but putting pressure on it. Try to get the pinion off with some pliers holding only the shaft and the pinion.
OR with the pinion in a vise, tap the shaft with a bolt/rod and catch the motor on towels or something.