No, it won't. Some CDs from the early 90ies are not playable anymore because the foil that stores the data is damaged through aging processes. DVDs and hard drives have similar problems and won't last longer than 5-15 years if you are not lucky.
Would it help to seal the CDs/DVDs/CDROMs in a vacuum bag? And/or in cryogenic storage?
A nitrogen-filled container would be more practical than a vacuum. Lowering the temperature would definitely help, although too cold could be bad.