If shareholders have to pay the debt, then the shares will be less valuable, and Musk (whose wealth is measured in shares) will be less wealthy, no?
Musk only owns 42% of SpaceX; he only takes 42% of the loss as if he continued to own Twitter outright.
By a tad. SpaceX's worth is an order of magnitude more than Twitter's debt. I doubt any serious person considering buying shares in SpaceX will spend even a moment worrying about Twitter.