If there is equity in the home then you should be entitled to a portion of any sale proceeds after paying of the mortgage and any other encumbrances. If the house is worth less than the loan, then there is nothing to gain form the sale of the house. Since you are not liable for the loan, the lender will not be able to seek payment form you but you will probably be a defendant in a foreclosure action because you are on the title.
I provide a free 15 minute telephone consult for security deposit claims and eviction defense. No attorney-client relationship is created by answering questions in this public forum. If you wish to create an attorney-client relationship, you must contact me directly and sign a representation agreement. Answers are provided based on general ideas and an answer specific to your situation would require a review of all documents.
You have the right to seek a partition of the house and from the proceeds request any extra expenses over and above what you should have been required to put in. However, if the home is upside down then there won't be any proceeds from the sale and you will be at a loss.
You shouldn't have any liability from the mortgage, but there may be liability if the property is part of an association. I would suggest seeking counsel from an experienced real estate attorney in your area.
This answer is provided without full consultation and is suggestive in nature and not to be considered legal advice without entering into a formal legal engagement with an attorney. Before you decide, ask any lawyer to send you free written information about their qualifications and experience. This answer is designed for general information only. The information presented at this site should not be construed to be formal legal advice nor the formation of a lawyer/client relationship.