I don't know, I think if you weighed up the costs of AI related datacentre spend vs. the average mathematics academic's salary you could come to a different conclusion.
The topic on itself is quite interesting, and far complex than supply/demand norms. Even before AI, there was and both wasn't shortage of mathematicians - academic pure mathematics - there's a glut. High school teachers - people exist; but they won't work for teacher salaries. Applied math - acute shortage - quant finance, ML research, cryptography, pharmaceutical modeling - we don't have enough. NSA - always struggled to hire - private sector salaries pull people away. Interdisciplinary - mathematical biology, climate modeling, materials science - domains where math is the bottleneck but the job title isn't really "mathematician" - acute shortage.