Concerning the Plishtim (Philistines), Easton's Bible Dictionary (quoted here) says:
They occupied the five cities of Gaza, Ashkelon, Ashdod, Ekron, and Gath, in the south-western corner of Canaan, which belonged to Egypt up to the closing days of the Nineteenth Dynasty. The occupation took place during the reign of Rameses III. of the Twentieth Dynasty.
and
As they did not enter Palestine till the time of the Exodus, the use of the name Philistines in Gen. 26:1 must be proleptic.
and
We learn from the Old Testament that they came from Caphtor, usually supposed to be Crete.
Wikipedia's article on the Philistines elaborates on the idea that the Plishtim were foreign occupiers, focusing on the theories that the Philistines were originally Greek.
Does the traditional Torah opinion agree with this assessment? It would seem the following verses tell a different story:
Bereshit 10:14 as interpreted by Rashi (based on Midrash Rabbah) says that the Plishtim descended from Cham via his son Mitzrayim (not the Greeks who are descended from Yafet, and not from Mitzrayim's son Kaftor):
Verse 14: [Also] the Pasrusim, and the Kasluchim from whom came the Plishtim. They descended from both of them. For the Pasrusim and the Kasluchim would exchange wives with each other and the Plishtim [Philistines] descended from them.
Is this discussed anywhere? Are all the references to the Plishtim in Bereshit 26 to Avimelech, king of the Plishtim proleptic? What about the reference in Shemot 13:17?
According to Judaism, did the Plishtim always live in Canaan/Israel, or did they only show up later?