In the Middle Ages, people did not believe that the earth was flat. At least in the circles of the enlightened people, the rest of society simply did not have such abstract questions in mind for them.
Educated people were well aware that the place they lived in was a sphere. This knowledge had been around for a long time; as early as the fifth century B.C., the ancient Greeks were aware of the sphericity of the Earth.