There is something to be said of for the individual cultures being even stronger during those times. Perhaps the formation of the German nation state was a counter reaction to the Napoleonic wars?
Anyway, this has little to do with immigration from all over the world: All these kingdoms already had the same language and largely the same culture.
Have states such as France ethnically cleansed other peoples from within their borders? If so, then why isn't that mentioned in the well-known histories?
[https://en.m.wikipedia.org/wiki/Joan_of_Arc] [https://en.m.wikipedia.org/wiki/French_Inquisition]
It did somewhat calm down once the Republic’s formed, but even today there are large conflicts with ‘Normal’ French society and the large scale ghettos from (typically Muslim) immigrants and refugees in France.
The nation state of Turkey's establishment out of the ethnically diverse Ottoman Empire deployed all of the above.
It was always a mix of different peoples - Celtic, then Romans when they invaded, then various Germanic peoples (including the Franks that gave the country it's name)... even the standardization of the French language is fairly modern. We had Occitan and Provincal and Breton spoken, it's only in the past ~200 years or so that industrialization has given a "uniform" culture.