CD-R is written in an organic-dye, which deteriorates ( I've read the AZO chemistry is more enduring )
CD-RW is written in the crystallization of a metal layer.
CD-RW is permanent record, unless you heat them, or blank them, or overwrite/rewrite them: chemical-deterioration isn't a problem.
I learned this with backups, many many years ago.
I've no idea if DVD-RW discs also are recorded in a eutectic metal layer, but they've multiple record-layers ( 2? ), and I'm don't know how you can make a eutectic-metal layer that is transparent-enough to get through/past it to write the next layer,
I have, incidentally. Not on purpose: My father rearranged a room whilst I was away, putting the entire disc collection on the north-west-facing wall of the house. Bookcase heated and cooked the lot in the afternoon summer sun that January. He was upset when I explained why nothing worked any more.