Each house of Congress is the judge of its own members' qualifications and elections returns, and together they are the judge of the qualifications of the President and Vice President. In principle they could allow Musk to become President; in practice it would never happen. (It's also possible that the courts might step in and forbid some candidacy on qualification grounds, but I think that's unlikely.)
I kind of love the ridiculousness of the idea of someone who cannot be sworn in running anyway.
Like when dead people win elections. A dead guy won a seat in the Nevada legislature this past November.