That's, again, the contract. Seems some people can't tell between legal and moral, unless we talk about the 70s and segregation or something like that...
The guy purchased the right to the house once the current owner dies, but you believe it's immoral for her to continue living in it, or renting it out, or loaning it to friends, while she is alive. I think it's immoral to demand the house while she's alive, since that wasn't the deal.
Sometimes legality and morality are widely separated, but here they seem related.
On the other hand, having someone pay tons of money and then die without anything to show for it, I do see, even if he "willingly signed into it".
There's also a threshold over which it should just be handed over. That such a threshold wasn't in the contract doesn't make it any less odious.
Also, I expect people buying such rights are generally well-off, and the people selling it to be relatively poor. After all, the buyer must be able to pay money on a house they cannot live in for an indeterminate period, and the seller typically chooses this construct to be ensured of both a roof over their head and money to live from for one's entire life, no matter how long that is.
The odds in this lottery get better every month for the buyer, so, assuming that the buyer can afford to buy into this, they should have no reason to want to get out of this.
I fail to see anything immoral here.