Companies overhired in the post-pandemic boom — and they’re pouring huge amounts of money into AI infrastructure.