Rashi and the Ramban offer two different views regarding Avraham's decision to flee to Egypt in response to the famine in Eretz Yisrael. According to Rashi, travel to Egypt was the correct decision given the lack of food in Eretz Yisrael. The situation was a test of Avraham's faith. Would Avraham question G-d or remain true in his committment after following G-d's command only seemed to bring hardship? Ramban disagrees and writes that given G-d's promise and command to go to Eretz Yisrael, Avraham had no right to leave the land. This was an error in judgment on Avraham's part because of which his descendents would be exiled to Egypt.
In discussing this on Shabbos, the popular understanding of the debate seemed to be whether we look at G-d's command to go to Israel through the paragmatic lens that allows for a waiver in times of famine, or through a lens of idealism that demans committment at all costs. The Ramban's opinion appears to be consistant with his views regarding medical care -- were a person a great enough tzadik, there would be no need for doctors, as faith alone is a cure for illness. The Rambam famously disagreed, as pursuing medical treatment is as much a part of normal conduct as eating, drinking and sleeping and does not betray a lack of faith. In fact, as Rabbi Friedman, R"Y of Mesivta Rambam noted, according to Rashi this itself may have been part of the test -- would Avraham use his intelligence to act rationally in spite of G-d's command, or slavishly remain in Israel even at the cost of starvation.
Rav Dessler writes that the views of the Rambam and Ramban both contain elements of truth, as the appropriate response may be relative to the religious level of the person. For a great tzadik who transcends the mundane, perhaps faith alone is sufficient to cure illness. For the rest of us who do feel the pull of physical needs, the Rambam's philosophical stance rings true. I saw R' Ya'akov Kaminestzky quoted as applying this same analysis to explain the difference of opinion between Rashi and Ramban. Was Avraham at this point in time at a relatively early stage in his religious growth where a rationalist/pragamatic approach would be appropriate, or was Avraham already a tzadik of such a caliber that a he should have transcended such considerations and remained in Eretz Yisrael at all costs?
I would like so suggest a Brisker approach to explain these views. Avraham was commanded in the ma'aseh mitzvah of going to Eretz Yisrael. But what kiyum mitzvah was that action designed to fulfill -- the kiyum mitvzah of yishuv ha'aretz, or the kiyum mitzvah of bitachon? Perhaps Rashi agrees with the philosophical stance of the Ramban. But here, Rashi would argue, we are dealing with a simple kiyum mitzvah of yishuv ha'aretz that does not demand staying in the land at the cost of starvation. Ramban, however, understood that the command to travel to Eretz Yisrael was not just to fulfill the mitzvah of settling the land, but was to actively demonstrate Avraham's faith in G-d. Given the need to demonstrate a kiyum mitzvah of bitachon, it behooved Avraham to remain in Eretz Yisrael no matter what the circumstances.