Big Tech is pouring hundreds of billions into artificial intelligence, driving record growth—but raising fresh concerns about whether the payoff will justify the cost.