Re: Loan on land that we are no longer able to develop
Government agencies usually cannot have their feet held to the fire for mistaken assurances given by their clerical staff, i.e. the doctrines of estoppel or detrimental reliance cannot usually be asserted against them. It's like getting bad advice from the IRS - you can't rely on it and have to pay taxes as due under the Code even if they mis-advised you.
I suggest in view of the large amounts of money probably at risk here that you should get local professional assistance. Dealing with city (or county) permit agencies is an art, not a science, and people who work with permits for a living and know the officials by their first names can accomplish things most mere mortals cannot.
Such professionals might be a lawyer who specializes in real estate development, but in this case maybe you need an architect or registered professional engineer or even a land developer who might take time out from his own projects to consult with you.
Most licensed contractors also have some ability to request and obtain permits, but a lot of them can be in over their heads when problems arise, and the usual contractor's expertise is in carrying out plans, not drawing them up to meet code. Still, if you have work under way or someone under contract to do work in the future, get their suggestions.
If you are in full compliance and the agencies are improperly refusing to issue permits, or have discretion (to issue or refuse a permit) and are abusing it, there are legal remedies including a petition for a writ of administrative mandate. This is a kind of extreme measure, however.
A final thought is that your lender also has a stake in your success, and it is possible if they are local they may be able to refer you to someone who can assist you in getting permits.