Writable CD/DVDs have a written shelf life of about 25 years before the layers start to deteriorate and the best ones have a max lifespan guarantee of 100 years. They do rot, just slowly. With a microscope you can of course stretch that a bit but they won't last forever.
The CDs/DVDs use a metallic mirror. With the exception of certain expensive CDs made for archival purposes, e.g. by Kodak, which used a gold mirror, the reflective layer can oxidize in time, becoming transparent, when it no longer reflects the light.
The pressed CD-ROMs/DVD-ROMs still have pits in the polycarbonate disc, even when the mirror is no longer reflective. Those could still be read with a more sophisticated microscope, e.g. by using phase contrast.
The recordable CD-Rs/DVD-Rs used an organic dye for storing the bits and after a long enough time that dye can be completely degraded and it can become impossile to read.
The rewritable CD-RWs/DVD-RWs store the bits in a layer that can be either amorphous or crystalline, with different reflectivities. After a long enough time, that layer can recrystallize, erasing the bits.
Of all the optical discs that have been available commercially, those with the longest archival time were the pressed CD-ROM with gold mirrors, where the only degradation mechanism is the depolymerization of the polycarbonate, which could make them fragile, but when kept at reasonable temperatures and humidities that should require many centuries.
There have been experiments with write-once optical memories where the bits are stored in an inorganic glass that should easily last for many millennia, but until now I have not heard of commercial products. In any case, none exist at an affordable price.