God shall enlarge Japheth, and he shall dwell in the tents of Shem; and Canaan shall be his servant. - Genesis 9:27
There is no indication that anything in this verse is mutually exclusive. That is to say: Japheth would do all of these things.
We can first establish that the descendants of Japheth were enlarged:
... to them belonged all Europe, and lesser Asia, Media, Iberia, Albania, part of Armenia, and all those vast countries to the north, ... not to say anything of the new world (America) ...
We see that Japheth's descendants did inhabit the "tents" of Shem on a number of occasions:
and he shall dwell in the tents of Shem;
inhabit the countries belonging to the posterity of Shem: this was verified by the Medes, who were the descendants of Japheth, together with the Babylonians seizing upon the Assyrian empire and overthrowing that, for Ashur was of Shem; and in the Greeks and Romans, who sprung from Japheth, when they made conquests in Asia, in which were the tents of Shem's posterity; ... and particularly this was fulfilled when the Romans, who are of Japheth, seized Judea, which had long been the seat of the children of Shem, the Jews; and at this day the Turks* who are also Japheth's sons, literally dwell in the tents of Shem, or inhabit Judea: ...
There are also those who don't believe this to be a reference to Japheth, but rather a prophecy specifically for Shem. I think that this is a strange reading seeing that Shem gets his own verse previously, but not a completely absurd one.
"God shall cause his Shechinah or glorious Majesty to dwell in the tents of Shem"
- the Targum Onkelos
There is also the possibility of the "dwelling in the tents" to refer to receiving instruction and learning from:
"and his children shall be proselytes, and dwell in the school of Shem;"
- Jonathan Ben Uzziel
So we see that there are three possibilities here, all of them historically correct:
- Japheth's descendants ruled over the lands of Shem's descendants numerous times. (Medes, Greeks, Romans, Ottomans, British.)
- Japheth is not the subject of that part of the prophecy, but the Messiah is. (Jesus being born to a descendant of Shem.)
- Japheth's descendants would learn and follow the teachings of one of Shem's descendants. (The conversion of the Gentiles to Christianity.)
* John Gill wrote this in around 1750.