My sympathies for your situation;
The good news is that an adult child is not responsible for a parent's medical bills, unless they co-sign on them. There is a statute that allows for liability but it is rarely enforced:
“ If any person being of full age, and having sufficient income after reasonably providing for his or her own immediate family shall, without reasonable cause, neglect to maintain and support his or her parent or parents, if such parent or parents be sick or not able to work and have not sufficient means or ability to maintain or support themselves, such person shall be deemed guilty of a Class 2 misdemeanor; upon conviction of a second or subsequent offense such person shall be guilty of a Class 1 misdemeanor. If there be more than one person bound under the provisions of the next preceding paragraph to support the same parent or parents, they shall share equitably in the discharge of such duty.” Financial strain is a defense, as is "reasonable cause" to refuse, which has not been defined. Only PA actively enforces their statutes; most are simply left over from the common law doctrines.
If the debt collector asserts otherwise, that is a violation of the federal Fair Debt Collection Practices Act, which allows for actual damages, or $1,000 fine per violation.
As for the spouse, generally if there are existing medical bills, they will be divided during the divorce. So it would depend what the judgment stated- if they were all assigned to the patient, for example, then the patient would primarily be responsible. If the patient did not pay, then the creditors may go after the former spouse for that portion that were incurred during marrriage (the divorce documents are binding between the spouses, but not for third parties).
Debts incurred after the divorce are the responsibility of the party incurring them.
Generally the creditor will submit a bill to the estate of the decedent and the executor will pay the legitimate bills.
Of course, estate planning is always a good idea, and many people like trusts- there are spendthrift trusts that can help protect assets.