It would be possible to grow enough on the moon to support a colony there, but importing food to Earth is crazy expensive.

yeah, everything about space is crazy expensive. Hard to do when wildfires, floods, and hurricanes are slamming you every few months.

When the crop failures get serious and the famines begin there will be even less money for going to space. Wars will eat up most of it.
When you wonder about the future, just look at the past and our record of solving problems with anything besides more war. Leaving the planet and going of into space is not and will never be an option. Never.

Rebuilding every major coastal city in the world and all the harbours and access to them isn't liable to happen either. We're too busy filling the oceans with plastic and burning noxious chemicals so that the rich may never want for anything.
Good coffee, good weed, and time on my hands...