I agree with the opinions of both lawyers, but I would say that if the two of you are amicable I would attempt an uncontested divorce and see if you can agree to one or the other of you having the house. I would then file for bankruptcy and pull the house through that and then at the reaffirmation of that debt, see if you can modifiy the mortgage into the name of the spouse wanting the house.
The divorce agreement, decree or judgment supposedly settled the rights and obligations between you and the former spouse. However, it does not change the obligations each of you had with third parties who were not in Court when you got the divorce.
The ex-spouse may refuse to make payments to credit card companies, car financing companies, mortgage companies, etc. Your ex may even file for Bankruptcy.
Depending on the law in your State you may have an action against the ex-spouse, and you may even be able to sue the ex-spouse if they file for Bankruptcy and have their obligation to you declared “non-dischargeable”.
Unfortunately the divorce or the ex’s Bankruptcy does not relieve you of any obligations you had to these third parties.
See a lawyer right away!
REQUEST: Please give this answer a "thumbs up"(below) if you find it valuable.
Disclaimer: This answer does not constitute legal advice. I am admitted in the States of New York, New Jersey and Massachusetts only and make no attempt to opine on matters of law that are not relevant to those three States. This advice is based on general principles of law that may or may not relate to your specific situation. Facts and laws change and these possible changes will affect the advice provided here. Consult an attorney in your locale before you act on any of this advice. You should not rely on this advice alone and nothing in these communications creates an attorney client relationship. The opinions expressed herein are those of the author only and the fact that he has worked as an Assistant District Attorney; State Supreme Court Clerk; Special Assistant United States Attorney (Hawaii); Assistant Cornell University Counsel or Judge Advocate, United States Marine Corps should not be relied upon to assume that these statements reflect the policy of these organizations.