It's useful to think in terms of a so-called "bulk rating", which is HP times the appropriate defense stat, because that's pretty much what you're measuring with respect to how well you can survive certain hits.
In the case of an Aegislash with a neutral nature (in actuality you're probably running Brave, or Quiet in the case of a special set, but none of those natures touch the defense stats anyway) and no EVs in anything, it can have 261 HP and 336 in each defense stat, for a bulk rating that's the same on both sides at 87,696. Supposing, then, that you were afforded 256 EVs to invest in the bulk stats, maxing out the HP stat gives you an extra 63 points there, 24% more than you had before, and even disregarding those last 4 EVs entirely, the bulk ratings on each side are now 108,864. Meanwhile, if you split them among the defense stats, not only do the points in each stat go toward just one side's bulk, but you're only adding 32 points each to those stats that already had 336 in the first place, making a difference of less than 10%. Now the bulk ratings are only 96,048, noticeably less than if you went after HP.
All else being equal, sure, you should generally prefer EVs in HP when seeking maximum bulk, but not always. Take Guzzlord, which starts with enormous HP (587 without any EVs) but rather anemic defense stats (just 142). That's a base bulk rating of 83,354 before EVs, but here maxing out HP only makes about an 11% difference, upping the rating to 92,300. Instead, you can put it in the defense stats, where even a half-full EV bank is still better than a 20% increase of the original stats, and the bulk from doing it that way would be 102,138, making that the superior choice.
Things get messier when you consider that not everything has its defense and special defense stats the same, and some of the really lopsided cases like Chansey make for interesting decisions in allocation. Going full-on into physical defense there makes a difference of more than 100%, and you have more points to work with because it's extremely uncommon that a Chansey would ever want to invest in the attacking stats or speed, but do you want to really shore up that physical side and prevent it from being taken as a weakness (in which case you'll choose to put the rest in HP) or do you want to simply achieve the highest sum of the bulk ratings on each side (in which case it's actually better to go for Special Defense, because even as high as that is, the EVs there will make more of a difference than they would going into Chansey's ludicrous HP)? The answer really depends on what role you expect it to play, and what attacks you expect it to come in and try to sponge up. There is the issue that the opponent is the one who decides what moves they use, not you, so you can almost never be sure of statements like "it's okay, this Chansey won't face off against any physical attackers." But if you think you'll have enough control over its use in the heat of battle, you can skew a particular Pokemon to give extra attention to one side or the other, and shift the EVs accordingly with what makes sense to you.