For anyone worried about the gargantuan costs of developing artificial-intelligence infrastructure, it was comforting to think that Big Tech firms could just turn off the spending taps if demand for chatbots and coding tools didn’t pan out. That’s starting to look like wishful thinking.