Can't comment on ski helmets, but the foam structure in bicycle helmets is like a crumple zone in a car. It's not meant to take more than one impact since the foam crushes to absorb energy. The plastic outer shell over the foam helps it hold together during a bad crash where you might hit your head several times, but essentially a bicycle helmet is a one-shot deal.
I don't know what the motorcycle helmet laws are but I suspect they prohibit use of a bicycle helmet. Crashing a bicycle at 30mph is bad enough, you'll definitely want more robust protection if you go down at 50 mph.