All you said is true, but so is the fact that those problems have been solved in practice and the technology successfully used. It's not a hypothetical; it can be done, given enough time and resources, we can just talk about whether it would work for this particular vehicle.Size and gyroscopic effects are going to be a huge problem, in addition to safety ( you are riding next to an extremely powerful grenade, therefore you need a way to shield it, which would be very heavy ).
A 10lbs fly wheel can rip through a car's engine. 10lbs might not be enough for a considerable amount of energy on an ebike.
There are a lot of engineering problems to solve with that route..
A 4.5kg disc at 1m diameter, spun up to 20k rpm can store about 300Wh of energy. That's more than enough for the OP's case, which was to drive directly off of solar, and not really charge any batteries to speak of. The goal wasn't to choose a perfect battery chemistry, it was to make the vehicle go ~indefinitely.