והנשארים בכם ימקו בעונם בארצת איביכם; ואף בעונת אבתם אתם ימקוRegarding the second half of the verse, Rashi quotes the Sifra that asks how a person can be punished for his ancestors' sins. The Sifra explains that one is only punished when one continues in the sins of one's ancestors. Then, even the punishment for the ancestors' sins are brought upon a person. However, Rashi seems to deduce this not from the thelogical question and scriptural contradiction (with Deut. 24:16) but from the word "אתם - with them". He seems to place that word with the former phrase rather than the latter, as translated above (in the New King James version), meaning that the ancestors' sins are with them rather than that they will languish with them. The difficulty raised about this is that the cantillation notes (trop) connect this word with the latter phrase and not the former (see R. Eliyahu Mizrachi's supercommentary on Rashi).
And those of you who are left shall waste away in their iniquity in your enemies' lands; also in their fathers' iniquities, which are with them, they shall waste away.
R. Tzvi Hersh Wessely, the author of the commentary on Leviticus in Moses Mendelssohn's Bi'ur, explains as follows, as described by R. Alexander Altmann in Moses Mendelssohn: A Biographical Study, pp. 415-416:
Wessely considered this interpretation a bit forced, yet he did not dismiss it entirely. He merely invested the rabbinic phrase "if they cling to the deeds of their fathers" with a new meaning: if the children of sinful parents are inclined to repeat the evil acts of their forebears, they will be punished, even though they did not actually commit the acts. For God, "who searcheth the hearts," knows that the evil desires they harbor would cause them to sin, should the opportunity present itself.Mendelssohn, in an editorial note, strongly disagreed with this interpretation (ibid.):
To cling to the deeds of their fathers is understood by Wessely to mean being predisposed to imitate their fathers. Divine justice is meted out because of God's knowledge of how the children would act in certain circumstances.
Mendelssohn proceeds to explain why the children should have to bear the iniquities of their forefathers. Implicit in his little discourse on the subject is the view that there are two kinds of divine retribution, namely one that works through natural causes without requiring a miraculous intervention, and one that represents a supernatural and miraculous act. No punishment of the second kind is ever inflicted on children because of their fathers' sins. This is what the principle enunciated in Deuteronomy 24:16 amounts to. However, the evil inflicted as punishment for grave sins by a supernatural and miraculous divine intervention does not vanish with the generations upon which it was decreed. Its effects remain with their descendants, and what was once a miraculous event turns into a natural condition with natural consequences. It takes another miracle to undo these effects and restore the previous condition. Thus, Israel's exile from the Holy Land was not a natural punishment: it happened as the result of a special divine intervention. Once the Jewish nation was exiled, however, the fate of being in exile became a natural situation, and the children born in foreign lands bear the "yoke of exile" as a natural consequence of what once happened...R. Ya'akov Tzvi Mecklenburg, in his Ha-Kesav Ve-Ha-Kabbalah, was clearly influenced by this discussion and quotes someone he calles RSh"P. He then offers his own explanation: "אבתם - fathers" comes from the root "אבה" which means desires. People in that situation are punished for their desires to sin even if they did not turn them into action.
The meaning of the verse is therefore perfectly clear: the children do bear the natural consequences of the supernatural retribution decreed upon their fathers because of severe iniquities.