OP, you're just a little off on your description. (see below) You are correct though, flat Earth would not generate a north/south magnetic pole. If there was flowing iron under the flat Earth surface, the convection currents would flow from hot to cool. i.e. towards the surface. (unless thermodynamics is also wrong) You'd have a whole mess of magnetic currents without the spin of Earth to align them.
Right at the heart of the Earth is a solid inner core, two thirds of the size of the Moon and composed primarily of iron. At a hellish 5,700°C, this iron is as hot as the Sun’s surface, but the crushing pressure caused by gravity prevents it from becoming liquid.
Surrounding this is the outer core, a 2,000 km thick layer of iron, nickel, and small quantities of other metals. Lower pressure than the inner core means the metal here is fluid.
Differences in temperature, pressure and composition within the outer core cause convection currents in the molten metal as cool, dense matter sinks whilst warm, less dense matter rises. The Coriolis force, resulting from the Earth’s spin, also causes swirling whirlpools.
This flow of liquid iron generates electric currents, which in turn produce magnetic fields. Charged metals passing through these fields go on to create electric currents of their own, and so the cycle continues. This self-sustaining loop is known as the geodynamo.
The spiralling caused by the Coriolis force means that separate magnetic fields created are roughly aligned in the same direction, their combined effect adding up to produce one vast magnetic field engulfing the planet.