The pasuk seems to say that the Jewish people dwelled in Egypt for 430 years, yet, we know that this simply cannot be true. Rashi does the math and adds up the number of years Moshe’s grandfather Kehos lived, the number of years Amram lived, and the number of years Moshe himself lived until the exodus and the number is far short of 430.
Rashi addresses the problem by explaining that the pasuk is not telling us the number of years the Jewish people lived in Egypt, but rather the number of total years spent in galus, in lands other than their own. Compare the structure of our pasuk with that in Devarim (2:14): “The days which we travelled from Kadesh Barne’a until we crossed Nachal Zared were thirty eight years…” The Jewish people did not spend 38 years travelling from Kadesh Barne’a to Nachal Zared -- what the pasuk means is that 38 years elapsed from the start of the journey until they reached Nachal Zared (Ramban). Here too, the number 430 sums up the total time elapsed in galus, not the total time spend just living in Mitzrayim. (See Ibn Ezra as well.)
Yet all is still not well. Avraham Avinu was told that “Ger yi’hiyeh zaracha b’eretz lo lahem v’avadum v’inu osam arba mei’os shanah,” (Brashis 15:13). There was a promise and prophecy given to Avraham that his decedents would suffer 400 years of persecution and servitude. However you work out the technical discrepancy of 30 years between that promise of 400 years and the 430 years mentioned in our pasuk (see Ramban), the more fundamental question is that the slavery and persecution did not go on for 400 years. The Jewish people may have been strangers without a homeland yet, as Rashi explains, but there was no “v’avadum v’inu osam,” no slavery until they got to Egypt.
Ramban in Braishis (15:13) writes:
זה מקרא מסורס, ושיעורו כי גר יהיה זרעך בארץ לא להם ארבע מאות שנה ועבדום וענו אותם, ולא פירש כמה ימי העבדות והעינוי
In other words, Ramban juggles the clauses in the pasuk. The 400 years is the duration of the “ger yi’hiyeh zaracha” promise of being strangers. It is not connected with the clause that immediately precedes it of “v’avadum v’inu osam” promising slavery and persecution.
Ksav Sofer in our parsha interprets the pasuk psychologically. The Avos were not persecuted or enslaved, but they lived with the knowledge that their children would be. Although the gezeirah did not apply to them personally, each one of the Avos felt the pain that would come to the future generations. They psychologically were in Mitzrayim, even if physically the avdus had not yet begun. Because they anticipated the galus and empathized with the suffering their children would endure, the 400 or 430 years are counted from their lifetime, shortening the time their children would spend in actual servitude (He concludes: "v'zeh peirush mechudash v'nifla.")
Parents worry about their children; they anticipate suffering happening even before there are real problems and concerns. The pain they feel sometimes serves as a substitute or tempers any real punishment that the midas ha'din may have in store, and it happens often without our even realizing it.