Rabbi Yitzchak Leon ben Eliezer ibn Tzur, author of Megillas Esther (1592)

The Megillas Esther attempts to explain why the Rambam does not count living in Eretz Yisroel as one of the 613 mitzvos. He says that this is because the mitzvah only applied in the ancient Temple times, and the Rambam only counts mitzvos that apply for all times. In his words, "The mitzvah to take possession of the land and live in it only applied in the days of Moshe and Yehoshua and David, and as long as the Jewish people did not go into exile from their land. But once they went into exile, this mitzvah does not apply for all generations, until the coming of moshiach. For on the contrary, according to the Gemara at the end of Kesubos (111a) we were commanded not to rebel against the nations, to go to conquer the land by force. The Sages proved this from the verse, 'I have adjured you, daughters of Jerusalem...' They explained this to mean that Israel must not go up as a wall."

However, this answer is perplexing. It doesn't seem to explain why the Rambam didn't count it as a mitzvah. The mitzvah to live in Eretz Yisroel will apply in the times of moshiach, and the Rambam counts mitzvos that will come back into force only then, such as terumah, maaser, challah, and all the mitzvos of the Temple service. Indeed, most of the other commentators disagree with his answer for the Rambam, although they don't dispute his use of the Three Oaths as a line of reasoning.

Rabbi Chaim Elazar Shapiro, the Munkaczer Rebbe, known as Minchas Elazar (1871-1937) has a teshuva in which he explains the Rambam in accordance with the Megillas Esther. He says that in the time of moshiach, the mitzvah to conquer the land and expel its inhabitants will not simply come back into force like terumah and maaser. Moshiach will come in a miraculous way, predicted by a prophet; he himself will be a prophet close to Moshe Rabbeinu's level (Rambam Teshuva 9:2), and he will be able to tell each Jew what tribe he comes from (Melachim 12:3). He will succeed in getting all Jews to repent (Melachim 11:4), a feat no one could accomplish under normal conditions. All the gentile nations will call in the name of Hashem (ibid.), and they will come to hear moshiach as well (Teshuva 9:2). The statement of the Gemara (Shabbos 63a), quoted by the Rambam (Melachim 12:2), that "there is no difference between this world and the days of moshiach except the subjugation of the nations," means that in the general world there will be nothing miraculous, but moshiach himself will be a wondrous person. Thus the Jewish people will not have to conquer Eretz Yisroel in those future times; moshiach, with his influence over the nations, will solve that problem. It is thus incorrect to say that the mitzvah of taking over the land will apply in the future, for even in the future it will not be a mitzvah for the Jewish people; it will be moshiach's task. (Minchas Elazar 5:16)