They were evicted from their dwellings and told that they had housing in the ghettos. By 1941 any Jew not in a ghetto (or camp) in German controlled territory would most likely have been shot. (as that was easier than arranging transport to a ghetto, or camp)
Most survived. There was a ghetto but Jews didn't have to live there and it was not sealed off. At the time Shanghai was under Japanese occupation, and the Japanese were completely bewildered by European antisemitism.
The Warsaw ghetto was the largest ghetto established in Poland. the total of Jews that can be crowded in is about 450,000 Jews. They were crowded into an area of 1.4 square miles that was the Warsaw ghetto.