Have you tried putting a CD or a DVD in a microwave oven? Put it on high for 3 seconds.
That's probably what an EM pulse would do.
A microwave typically uses a 1300 watts (typically) bulb. Put your hand a foot away from a 100 watt lightbulb, with and without a sheet of paper in between. feel the difference in heat? Imagine it was 13x stronger.
You COULD in theory have an EM pulse so powerful that it would have equivalent energy levels when it strikes your CD despite the square cube law dispersion pattern (and also amped up because a pulse lasts a tiny fraction of a second while microwave cooking takes longer) but an EM pulse that powerful would wipe out all life on the planet.
Your typical "destroy all electronics" EM pulse is a tiny tiny fraction of that amount of power. When it hits conductive metals it creates an electric current which burns away capacitors and transistors and other components of a printed circuit board. The more fine the electronic component is, the more susceptible it is to EMR (unless shielded. A faraday cage would nullify it)
... that being said, some optical media uses metalic dye, which might be conductive.