You may be thinking of the Blu-ray manufacturing process, not CD or DVD.
It’s been quite some time since I was involved in manufacturing optical discs, but I remember that there were at least two, perhaps three widely used processes that were used for BD. Singulus had one method - Origin another, and perhaps a third that used a punched film for the cover layer of the disc, not the data layer. In some of the systems, the cover layer was created using spin coated UV lacquer, similar to the spacer layer in DVDs.
All three - CD, DVD and BD - use injection molded polycarbonate against a stamper for the data layers.
In BD, the tricky bit is protecting the data layer, and ensuring an absolutely even thickness across the surface of the data layer since this is actually the read side of the disc. Hard to do with spin coating (but cheaper), but easier with a pre-manufactured film (but more expensive).
Even trickier is adding a second data layer.
CD and DVD are manufactured now as they always have been.
Also, sorry: pits aren’t etched into the glass master - they are exposed into photoresist, developed and then metallized, similar to semiconductor manufacturing.
Then a “father,” “mother,” and a “stamper” can be grown in electroforming.