The problem with the mechanical speedos is finding one that is calibrated to work on your wheel size. If you are running 26" wheels, then you need to find a speedo for 26" wheels. If you put a speedo on your bike that is calibrated for 20" wheels, your speed and mileage will be way off.
This is why digital speedos are better because you can program your wheel size into it. No need to search for the correct speedo, just buy a quality digital one, set your wheel diameter into it and you're good to go.
The digital ones also have a magnetic pickup which is less clunky that a mechanical pick up that you would have to use with a mechanical speedo. Plus there are no moving parts with a digital speedo.
Newer mechanical speedos have plastic gears inside them (unless you get an old one with metal gears, and they're not cheap) and the plastic gears will not stand up to constant 30+ mph runs.
the plastic gears will fail because most bicycle speedos usually never see those kinds of speeds.
A motorcycle speedo would not work unless you can find one that is calibrated to run on the same wheel size as what's on your bike. there are no motorcycles that I know of with 26" wheels. Besides that, you would have to make some kind of pickup to go onto the bike wheel hub to make it work because most motorcycle speedo cables are threaded right into the brake drum (or hub) or in some cases into the transmission. They run off of a worm gear most of the time, and that worm gear drives a pinion gear on the end of the speedo cable.
A moped or scooter speedo would bne set up the same way and it's possible that newer moped and scooters have electronic speedos with electronic pickups. I don't know much about newer mopeds and scooters, so I am just guessing on that.