CDs last 'forever' if properly handled (i.e. not scratched, not left in the sun, etc.) They're read by a beam of light, so there's nothing in them that will wear out.
Cassette tapes last a long time but they do wear out.
Flash memory, I don't know. I've had a lot of trouble with flash zip drives and SD cards. OTOH I have a flash drive I keep in my pocket for work, and I've used it several times a week for two years and it's still fine. Most flash drives, after a few months you get a message that the drive must be re-formatted. If you ignore that, the drive still works great. But it kind of gives me a bad feeling, if you know what I mean.