SpaceX has filed confidentially for an initial public offering, according to people familiar with the matter, bringing billionaire Elon Musk’s rocket, satellite and AI company closer to delivering the biggest-ever listing.