This is my opinion.
The rule making one undesirable (but it doesn't invalidate ordination) regarding debts is most likely rooted in political and social context of ancient world in which the Buddha lived in.
In ancient India, there probably weren't humane rules where you could go bankrupt and write-off ALL unsecured debts, and have creditor protection (creditors can't touch you legally, and you are no longer in debt to them). Bankruptcy probably didn't exist back then as it does now. If one were in debt and couldn't pay, one could have become someone's slave, or be assassinated (or tortured) for punishment.
The Buddha probably didn't want creditors to hunt down members of the sangha, and He probably didn't want the laity to view monasticism as an escape from slavery or debts.
Bankruptcy is for the reason to terminate the unsuccessful business and to write-off unsecured debts. Life happens and sometimes you can't pay off borrowed money. Bankruptcy is for that reason. You are no longer in debt (at least after 1 year or so) when you go bankrupt, and could start a new business later on.
One has more possession as a bankrupt person than as a monk. So I don't think that bankruptcy as it is today in western society is equivalent to having debts as it was in ancient society.
Should there be more value placed on paying off debts, or on ordaining (for a valid reason, maggaphala)?
Is one considered to be in debt if one declares bankruptcy and writes-off unsecured debts?
"'I am not anyone's anything anywhere; nor is anything of mine in anyone anywhere." - MN106 TB Translation.
"Life is a struggle. Life will throw curveballs at you, it will humble you, it will attempt to break you down. And just when you think things are starting to look up, life will smack you back down with ruthless indifference..."