Tech giants like Microsoft and Meta are using creative financing and short-term contracts to distribute the risks associated with the surging demand for artificial intelligence.