After 17 years using optical media I can say you need a bit luck.
My CD-Rs from Prodisc which I rescanned this year gets class 2 to class 5 with high error-rates; same brand, same burner, same batch, same speed used.
Some of my non-labeled CD-Rs from BurnMe lost the coating and became unreadable.
But overall optical-media can be last long, longer than HDDs
DVD: FUJIFILM03 from MBI, INFOMER30
BD-R: RITEKBR2 and RITEKBR3
With CMCMAG-BA5 and TDKBLD I also have one fail, but other discs still works fine