record-able CD/DVD uses up to 9 layers of chemicals some cyano. The laser that burns in mSecs at high temps is heat-work and at 25 degC over can years be subject to the same heat-work. Don't leave on the dashboard of your car!
Flash memory usually is an embedded computer - it handles the USB/SD protocols and counts the re-writes to all blocks and when near the limit, swaps one out with a redundant unused block.
Magnetic layers suffer print-through and other fade mechanisms.
All are prey to alpha particles, satellite design has to cope with far higher hit rates. They are soft errors, but for archives that is academic .
And there has been a post from a Catter who had 10 external HDD and found 5 had suffered dropped bits after 5 years. Even though the data had been duplicated, some data were lost.
The way they cram more and more into Flash is by miniaturising the elements (OK transistors). And the error rates go up as the number of molecules used in each element fall (to a current 100ish), so they have to have redundancy and error correcting codes. Using computing subsystems to handle the cleverness.
Next up is DNA storage. That can store even more and in 3D. Currently slow read and write times. And Write Once. But - watch this space.