Original: The shift forced the migration of millions of people, most of whom were Poles, Germans, Ukrainians, and Jews.
Simplified: The shift forced millions of Poles, Germans, Ukrainians, and Jews to move.