Not to sound harsh, but from an objective perspective, why do you think you're entitled to remain on-post even after you're no longer on active duty? SMs have always been required to give up their on-post quarters once they're no longer in service. There are exceptions depending on your local installation's housing metrics, extension requests for 30, 60, 90 days etc., but it's always been policy for the SM to move. This ensures the local housing areas maintain an available inventory for incoming personnel who choose to live on-post while they're still on active duty. Sounds like you're in a tough position, but put yourself in the shoes of an incoming family. What if they couldn't get on-post housing because the base was at 100% capacity, to include non active duty personnel taking up many of the on-post homes. They'd be in your current situation with having to come up with the funds to rent off post, purchase, etc, all while navigating the complexities of moving to the area from an alternate location. Not ideal to say the least.
All of the above said, the installation I am currently at has opened up on-post housing to retirees, gov employees, contractors etc, but there's only 2 areas on post where these non active duty folks can live. The rent is about the same as if these folks were paying BAH, however, they're also required to pay for electric, garbage, water, etc. I'd speak to your local housing office and ask if they have the option for you to remain in on-post housing (might not be your current neighborhood) once you're out and get the specifics of location, cost, lease terms, etc.
Lastly, and again, not trying to sound harsh, but if you've been going through an MEB, you've known that it was likely that you were going to be discharged for many months. The expectation is to plan accordingly to ensure you transition as smoothly as possible, to include planning to exit on-post housing. In my experience, too many SMs confuse "privileges" or "entitlements" with "rights" and they get upset when something doesn't go there way, even if long standing policy clearly articulates specific rules, regulations, and policies. There's always a way to get through a tough situation. Pick yourself up and make it happen, it's the only way. I wish you the best of luck during your transition.