You don't think robbing a bank is ethical? What you think bankers do?
Yours is probably posed as a narrower question of legal ethics. But from a broader perspective it may be considered as a philosophical question of the ethics of civil disobediance. How to act if you are caught between two incommensurable ethical commands, usually between "state" and some "higher" authority.
According to Hegel, this is the very crux of dramatic tragedy and a dialectical engine of history. He cites the case of Antigone, who is literally destroyed by the historical shift from ancient family duty to the laws of the state.Thoreau's or Mandela's "civil disobedience" are other example, though our modern fates are usually somewhat softer than Antigone's.
So, when could one ethically defy a law or violate a legal contract? When one can and must act rationally in the expectation of a "more just" future, however determined.
I would argue that the entire financialization and credit-debt structure of the U.S. is overtly unethical, concentrating wealth based ultimately on bonded taxation in the hands of small rentier class. It is "unethical" not only in being inequitable and unsustainable, but in the Hegelian sense of forcing the mass violation of other, incommensurable social duties.
The prime example is student debt. Capital value demands ever-increasing levels of education, which becomes an implicit duty of the young citizen. Yet the costs are transferred to other countries (hiring educated workers abroad) or into mass indebtedness of an entire generation. An indebtedness that increasingly outpaces the capacity of future earnings to liquidate it. Hence ethically and socially "irrational."
By this standard, I actually believe students today may have a "higher obligation" to not repay debt, one that outweighs the personal or even immediate social consequences. The case of housing may not be so immediately apparent, but there is a good historical argument that mortgages should be valued against average earnings in some way, not according to shareholder value or remote derivative transactions that affect the debt levels yet are entirely unaccountable to the social necessity of housing.
Bit of a stretch from home mortgages to Antigone, but hope this helps you consider the issue afresh.