Estimating:
Happiness: 10^2
Items: 10^2
Pokemon, with gender: 10^3
Natures: 10^1
Abilities: 10^2
Legal moves: (6*10^2)^4 / 24 = 10^9
Levels: 10^2
IVs: (3*10)^6=(3*3)^3 * 10^6 = 10^9
From these calculations, there are about 10^30 legal Balanced Hackmons sets, give or take. And given that I've cut down Natures, Items, and Happiness by a power of two for this calculation, we can round that up to 10^31, which is about ten nonillion.
As for EVs, only for a fantastically small fraction of possible EV spreads, I think, would anything actually hit the 252 EV cap; thus, we can assume that all 127 effective EVs are distributed randomly among the six stats, giving a starting calculation of 6^127 (while not every 4EV difference is meaningful below level 100, given that the number of stat-affectingly different EV spreads decreases exponentially as you drop below Level 100, they probably don't contribute much to the total). Of course, one does not have to use every EV. The number of EV spreads for any given number of EVs is about 6^x; fortunately, I knew enough calculus to ask Wolfram Alpha the right question to say that the sum for all of 0<=x<=127 is about 4*10^98. This is a very very very rough estimate, but it combines with the above number to give what I'd call about 10^129 legal Balanced Hackmons sets, which is about a fucktillion.
I don't even play this meta I just like math.