I think the idea is that short position pays off up-front, and then you don’t need to worry about the loan if everyone’s dead.
If by paying off you mean this bet actually working I think you’re right though. It seems more likely that the stock market would go up in the short term, forcing you to cover at a higher price and losing a bunch of money. And if the market stays flat, you’ll still lose money on interest payments unless doom is coming this year.
This is actually why a short position (a complicated loan) would theoretically work. If we all die, then you, as someone else’s counterparty, never need to pay your loan back.
(I think this is a bad idea, but not because of counterparty risk)