Meta Platforms Inc. will pay as much as $27 billion over the next five years for access to artificial intelligence infrastructure from cloud provider Nebius Group NV.