Oracle Corp. will likely maintain its investment-grade bond rating in the near term despite borrowing tens of billions of dollars to expand its artificial-intelligence push, according to UBS Group AG.