It's a new take on "How would you like to be buried with my people?"; "How would you like to merge your savings with my debts?".
No worries: you can marry somebody who is in debt without taking on the burden.
But a certain amount of prudence is involved. For example, if you create a joint account, then anything in it might be available to be pursued by creditors. Or if the person who is in debt seeks to avoid responsibility by transferring assets to a spouse, the courts might undo such transfers. In sum, if the debts are so large as to be a real threat to peace of mind, it might be good to sit down with a competent lawyer to go through what is possible and what is not a good idea.