What does the Torah mean when it gives the reason for not taking Yisrael via the land of the Pelishtim (the shortest route) as "Ki Karov Hu"?
Rashi Rashbam and Ramban #1 (citing the Ibn Ezra): Hashem was afraid that, since it was close and easy to return to Egypt the way they had come, at the slightest excuse, they would make their way back. 1
Ramban #2: This is not the reason why Hashem did not take them via the Pelishtim, but why He ought to have done so. 2
Hadar Zekenim #1, Da'as Zekenim #1, Rosh: The Pelishtim were Kerovim (relatives) of Mitzrayim (Bereishis 10:13,14). Since Yisrael fled from their relatives, they are prone to fight Yisrael and return them to their relatives. 4. Da'as Zekenim #2, Hadar Zekenim #2: Hashem did this Tovah 3 for Yisrael, for they are His relative
Which war is the Pasuk referring to?
Rashi (citing the Mechilta) and Ramban #2: The Pasuk is referring to any future war that they might be forced to enter into, such as that of the Amoleki and the Kena'ani, as recorded in Shelach (Bamidbar 14:45).
Ramban #1: It is referring to the battle with the Pelishtim, which they would have had to enter into had they traveled along that route. 1
Rashbam: It is referring to the battles pertaining to the conquest of Kena'an.
Seforno: Since the route via Pelishtim was close to Egypt and was used by many travelers, Pharaoh was bound to receive a report about Yisrael's whereabouts. As a result, Pharaoh would gather an army to attack Yisrael, who would take fright and return to Egypt. 2 So Hashem took them on a roundabout route via uninhabited terrain. 3
Targum Yonasan: This refers to the 200,000 4 men of Efrayim, who left Egypt early and went to Kena'an by way of the Pelishtim, were they began to plunder the herds of cattle belonging to the men of Gas, who retaliated by wiping them out. 5 Hashem knew that, if Yisrael would travel the same route and come across the remains of the B'nei Efrayim, they would take fright and return to Egypt.
Now that they traveled via the desert, they were not destined to encounter any wars until they reached the land of Sichon and Og. As for the battle with Amalek (later in the Parshah), that was no reason to return to Egypt, seeing as it was not they (Yisrael) who arrived at their land, but Amalek who attacked them, and they had no option but to fight in self-defense. Moreover, they were already too far away from Egypt to make their way back on their own (Ramban).
Just as some of them wanted to do at the Yam-Suf (See Targum Yonasan 14:13). Targum Yonasan adds that they were the dry bones that Yechezkel would bring back to life in the time of Nevuchadnetzar (See Na'ar Yonasan).
Indeed, when Pharaoh suddenly caught up with them at the Yam-Suf (See below 14:10) they wanted to return, but were unable to, since Pharaoh would not have accepted them (Seforno, Pasuk 18).
How could Hashem even contemplate taking Yisrael via the land of Pelishtim, bearing in mind that He intended to first take them to Har Sinai to receive the Torah, as He told Moshe by the Burning Bush (See Shemos, 3:12)?
Seforno: Although the quickest way to Har Sinai was via Pelishtim, Hashem deliberately took Yisrael on a longer route via the Yam-Suf, in order to drown the Egyptians there.
"Va'Yhi" always hints to "woe". Who bemoaned that Pharaoh sent Yisrael?
Hadar Zekenim #1: Initially, Pharaoh did not esteem Yisrael. When he saw them as an army encampment at the sea, arranged in Degalim, he bemoaned sending them. 1
Hadar Zekenim #2: Pharaoh bemoaned suffering 10 Makos, Egypt was emptied [of its wealth], and also he needed to send Yisrael. 2
Hadar Zekenim #3: The Kena'anim bemoaned that Yisrael will receive their land. A parable for this
What does it mean "v'Lo Nacham"?
Rashi: [Hashem] did not lead [Bnei Yisrael via Eretz Pelishtim].
Hadar Zekenim: Pharaoh had no consolation for sending Yisrael; it was a great loss. He will have consolation when he falls to Gehinom, and sees also the other nations there (Yechezkel 32:31).
Pesikta d'Rav Kahana 11, partially in Hadar Zekenim: [Hashem] did not conduct [with Yisrael] Derech Eretz. Normally, water comes from above and food from below. Here, food came from above and water from below! Normally, the Talmid goes in front and holds a lamp for the Rebbi. Here, Hashem went in front and illuminated for Yisrael! 1
Also other deviations are brought there. I heard that the Vilna Gaon\ck pnimim\proved from here that one may expound words of a verse, even if according to the Drashah, the remaining words (e.g. Pelishtim Ki Karov