I actually like this idea a ton.
It's worth noting that for the spans of time when full-on intercontinental magical missile exchanges aren't currently ongoing, your castle still needs to be able to perform the useful functions of a castle. This implies some ability to dominate and overlook the surrounding landscape, be able to relatively quickly deploy its garrison into the surrounding countryside, and receive visitors and supplies from its immediate environs. A minimalist concession to this would probably be a single above-ground structure, likely a tower or citadel, which could overlook the surrounding landscape, project power outwards, be a highly visible symbol of control, and make a more convenient drop-off place for supplies and trade goods than letting random mule traders into your underground vaults.
In an outright cataclysmic magical conflict, the overstructure itself would be destroyed or ruined very quickly; which is no huge loss as it's only one building which has done its job. Alternately, if the artifice exists, something compact like a tower or citadel might be able to be densely warded or built out of extremely robust materials in a way less practicable to do for an entire sprawling fortress. In this scenario the citadel itself might actually be the equivalent of an ICBM silo in the magical nuclear exchange; the terrible focal seat of power for a sorcerer king whose dread gaze can cast death half the world away. Meanwhile the storehouses, barracks and armouries sleep below, waiting for the thunder and fire to cease, and the smoke to clear.
It's further worth noting that if we compare this idea to the archetype of the Dark Lord's fortress from classic fantasy, or the archetypal ruined dungeon from roguelike games, parts of D&D and other classic fantasy, there are remarkable similarities. Both tend towards a (relatively) small structure above ground, and then a vastly larger underground complex made up of various vaults and tunnels. With the added wrinkle in the ruined dungeon archetype being that the point at which we get to see the fortress is typically deep into the post-apocalyptic future after the magical nuclear exchange; often when it's being squatted in by the fantasy equivalent of The Lord Humungus and his dogs of war. This provides an interesting framework in which to view these old fantasy standbys, I think, although in some cases (Angband for one) it's notably more or less the original framework. Hyperlight Drifter also runs with this idea full pelt, perhaps unsurprisingly given its post-apocalyptic setting and the influence of classic fantasy on the game.
Fantasy castles and subterranean fastnesses which are as much Fallout as they are The Fall of Gondolin are definitely something it would be cool to see more of.