Why People Settle in Shrinking Communities: A Unified Framework of Psychological, Environmental, and Cognitive Factors