SpaceX obtained a $20 billion loan to manage its debt before a planned IPO, amidst financial strains from its AI ventures and a high valuation.