"My understanding of these things is that this kind of debt is mostly unsecured."
The debt is secured by the home itself. It is a mortgage-backed security. In some places it is a non-recourse loan which means that once you hand over your house the lenders have no claim to the rest of your assets unlike a credit card loan.