system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What happens when someone takes out a massive loan (e.g. $20 million), and suddenly dies?

Let's also say this person has no immediate relatives or family in general  either, so the debt can't fall on a family member.  How would the lender get the money back?
gpt
Assuming the loan was secured by an asset, the asset is seized like any other foreclosure.  If it's an unsecured loan, the lender would sue the estate for whatever residue they can get, and write off the rest.

At least in Canada, your family does NOT take on your debts when you die.  If it's your spouse it's different because all financial affairs are entered into jointly and severally, so each person can be held accountable for the lot.  But kids?  Nope.  Arbitrarily making one adult responsible for the debts of another is called indenturing, a form of slavery, and is illegal.