Founders need to live in the Bay Area during the 3-month period in which they're participating in the YC batch, but I believe companies are free to move to wherever they'd like once that period is over. I can think of a couple that were based in Chattanooga (median income ~36k) and moved back there after YC.