You need to retain experienced bankruptcy counsel right away. The point, and the final result, of a chapter 7 bankruptcy in which you surrender the property is that the property is, well, surrendered. Your obligation on the mortgage(s) is discharged. So, the modification is senseless.
This answer is provided for informational purposes only. Actual legal advice can only be provided in an office consultation by an attorney licensed in your jurisdiction, with experience in the area of law in which your concern lies.
If you did not reaffirm the debt and filed a chapter 7 and got a discharge the banks are probably violating the discharge injunction by trying to refinance the mortgage. Most financial institutions refuse to refinance under the circumstances I stated. Talk to your bankruptcy attorney about this situation.
Once you were discharged, the possibility of reaffirming the mortgage ended. No loan modification can resurrect the personal obligation on the mortgage. Most loan modifications are either not granted or they fail. Good Luck.
[This communication is intended as general information and not specific legal advice, and this communication does not create an attorney-client relationship.]