The law allows a winning party to obtain their fees and costs from a losing party. If you lose your lawsuit, there is nothing that you can do about these fees or costs.
Your contingency would not include this provision. This is just a hazard of litigation. So it is appropriate that your agreement with your attorneys will not include this provision. It sounds like your attorney re-evaluated your case and feel that you could lose.
I have no idea why they did not disclose before, but perhaps it did not come up because they did not feel that you would ever be on the losing end of the litigation. Additionally, some attorneys are able to get fees and costs waived, so some clients never realize what they would have owed if they lose their case. It is also possible that they amended their initial action to include asking for their attorneys fees. This is something that they are not entitled to by statute, but relief that they need to obtain from the court.
It is very possible that they received the motion and were doing research to ensure that they had legal position to refute the motion before they brought it to your attention. (Their motion for attorneys fees is different than the authority that requires a losing party to pay for court fees and costs.)
At this point short of trying to get out of the lawsuit for the least amount of damage, there is not a lot you can do to protect yourself. If you move forward, you risk whatever the judge is putting on the table if you lose. If you move forward you could win. If you back out, your attorneys may be able to get you out. Really this requires an in depth conversation with your counsel. You also want to make sure that if your law firm is fronting costs, you will not be responsible for paying any money back if you walk away from the lawsuit.
If a judgment is granted against you, it will stay valid for six years, so they will have that period of time to try to get that money from you. They can put a lien on your home and/or garnish your wages to satisfy the judgment.
A lot of this could just be a negotiation tactic to get you to drop your lawsuit.