Leaving that community does not mean you are abandoning the need to 'give back'. There are other communities in other places.
Feed yourself first, then you can 'give back'.
I never occurred to me to stay where I was raised. For my time, the town I lived in was considered the worst in the county, and possibly leading the list for all of Western Pennsylvania.
My goal was a paycheck. I was willing to leave wherever that was happening.
After living in two locations, my wife insisted, and agreed, we would actively seek to get involved in community volunteerism in our next location.
We did, and we are still here.
You do what you can when you can.
Nothing says you have to diminish yourself to help others.