Potentially, but not before destroying or overloading more vital elements of electrical grid infrastructure.
The theoretical EMP or solar flare (more accurately, the resulting geomagnetic storm following a coronal mass ejection) that wipes out “all hard drives” would severely damage transmission lines of electrical grids long before disrupting spinning or solid-state storage media.
First, by disrupting or overloading the flow of electricity across transmission lines, any device would be rendered inoperable or without wired power. We saw this occur in the 1989 Hydro-Quebec blackout. The Canadian Shield is a massive, old stone formation that allows for little topsoil. When a highly-energetic geomagnetic storm rolled across eastern Canada in 1989, the current had nowhere to ground out and kept moving, blowing transmission breakers and overloading transmission lines along the way.
This event cost Canadian and global markets several billion dollars.
Second, if a prolonged period of geomagnetic storming occurred, some non-grounded devices might pick up enough current from a geomagnetic storm to overload (we saw this during the Carrington Event of 1859, during which telegraph operators reported their signaling devices failing, conducting current, injuring operators, and starting fires w/ telegraph paper, etc).
All that being said, any device not connected to power for an extended period of time will eventually self-discharge rendering it’s storage medium useless.
Humanity is increasingly dependent on a constant, uninterrupted flow of electricity. Building new, and/or retrofitting our existing, electrical infrastructure is becoming a mandate from US government regulators working with public and private utilities.Post too long. Click here to view the full text.