I don't think I'd gamble with foundation problems. If this is your first house, I'd avoid the temptation to gamble. Any house you buy is going to have some problems when you get it inspected. Nothing wrong with taking on a fixer upper, but a foundation issue is a different animal. Foundation issues can be anything from a few grand to "oh excrement we have to rebuild the whole thing, hand over your wallet". I can't really give any advice on location. Perhaps there's locations that are somewhere in between.
My Dad had to spend about $20K on his mother's house to fix a unlevel foundation from a huge oak tree root. Had to jack up the whole corner of the house to be repaired. I inherited the same house and had to spend another $7K because it settled again in several places. I feel I was lucky it was only that much.