זֹ֥את תִּהְיֶ֖ה חַטַּ֣את מִצְרָ֑יִם וְחַטַּאת֙ כָּל־הַגּוֹיִ֔ם אֲשֶׁר֙ לֹ֣א יַֽעֲל֔וּ לָחֹ֖ג אֶת־חַ֥ג הַסֻּכּֽוֹת׃
Esta será la pena del pecado de Egipto, y del pecado de todas las gentes que no subieran á celebrar la fiesta de las Cabañas.
Haamek Davar
Inscribe this in the book as a reminder that which I shall say to you, that I will utterly blot out, etc.. And also place [this matter] in the ears of Joshua. And this appears to be superfluous. For behold, every word of God to Moses was written in the book of the Torah, even without God's word that he write it as a reminder. And also, the matter of, place it in the ears of Joshua, is not understood. But first, we have to explain the body of the statement, that I will utterly blot out, etc. If the intention is about the kingdom of Amalek, why did the sages, may their memory be blessed, establish the commandment of remembering this for [all of] the generations, given that this evil kingdom was already erased from the world? And even if there are a few people from the descendants of that nation in the world, what does it matter? And if the intention is that its fame and remembrance be forgotten, that is completely impossible. For behold, the Torah is eternal, and it mentions it. Rather, the intention is perforce about Amalek's legacy in the world. For it is clear that Amalek did not harass the people of Israel for nothing. As there is no doubt that they were aware that it would not be easy for them to beat [Israel]. Moreover, were they not getting involved in a conflict that was not [even] theirs? Rather, it was because Amalek is the first of the nations (Numbers 24:20), as per the words of Balaam, when the light of the holy spirit manifested itself upon him. And perforce the intention is not that it is the most successful or fortunate nation in the world. For behold, Amalek was always a lowly kingdom. Rather the idea is that just like it is clear from a precise reading of the verses in the book of Genesis that the war of Amraphel and his colleagues was specifically against our father Abraham — because they knew that through him, there would be an Eye of judgment, meaning the bringing down of divine providence according to the actions [of people] — so too, when the Jewish people went out of Egypt and were prepared to receive the Torah, the nations of the world thought that it was very bad. So Amalek is the first of nations, in that it hates providence with the greatest hatred. So the Holy One, blessed be He, promised [here] that there will come a time when the remembrance of Amalek, meaning its legacy that the ways of nature be free from providence according to the actions [of people], will be erased. Such a wish will be forgotten by the nations of the world, and the Lord will be king over all of the world (alluding to Zechariah 14:19). And this is [the nature of] the days of the Messiah, they should come speedily in our days. And the Lord said to Moses, "Inscribe this in the book as a reminder," like a man telling his son a story to lead his heart to instruction — when he reaches something that is very critical that it be ingrained in his heart, his father becomes very exacting and says, "Remember this, my son!" Even though his wish is that he remember the whole matter, he nevertheless is more insistent about the critical thing in his story. So, too, must we remember all of the Torah by writing a Torah scroll. But since we see that the Holy One, blessed be He, said to Moses, Inscribe this in the book as a reminder, it is incumbent upon us to understand that we must especially remember this thing. As it is the desired goal that the glory of God fills the whole world; and it is incumbent upon us to believe that such a time will still come, and that is the days of the Messiah. And it is about this that God said further, place it in the ears of Joshua, the secret about this, and that is the timing of the End which he revealed to his ears. And what is understood is that this too is revealed to someone who is fitting for it.
Radak
כי לא שלם עון האמורי עד הנה, the time when the Emorite is due for punishment will not be until then. G'd is very patient with sinners, giving them a great deal of time to mend their ways. The punishment for sin is called עון, as we know already from Kayin (Genesis 4,13) who said of the punishment for his having murdered Hevel, his brother, גדול עוני מנשוא, "my punishment is too great for me to endure." We also find that the word חטאת is used both as sin and as atonement for sin, just as the word עון sometimes means "sin," and sometimes "punishment." Compare Zecharyah 14,19 זאת תהיה חטאת מצרים. The reason the Torah singled out the tribe of the Emorite among all the Canaanite tribes is because it was the strongest of those seven tribes. The prophet Amos 2,9 also quotes G'd of having destroyed the Emorite on account of the Jewish people, although the same fate overtook the other Canaanite tribes also.