If you want reasonably priced housing, the closest neighborhood is called "Arizona". The commute is about 3 hours.
But seriously gentrifying neighborhoods like Normal Heights and City Heights sometimes offer the most for your money. But they have some rough areas. Check out North Park and South Park too.
Surprisingly there can be (relatively) cheap rentals near the beach--I'm thinking Mission/Ocean/Pacific Beach-- if you don't mind living in an older building that may not have air conditioning.
The two big gym chains out here are LA Fitness and 24 Hour. They both offer middle of the road gyms with usually pretty rank locker rooms. If you belong to Costco, you can buy a discounted membership to 24 Hour. They have branches everywhere.
I've never been there but World Gym in PB has a reputation as being a place for serious lifters.