The assumption
There is an underlying assumption with respect to the idea of kingdom, as humans we assume it refers exclusively to human rulers and earth bound kingdoms. This is mostly based on translation because the Greek should better be translated as realm or the translated word kingdom should be understood as “the right/authority to rule over a region” βασιλειας
Biblically and practically speaking, even today, the power resides in the heavenly places (specifically above the clouds in the second heaven below the firmament).
Broader context
Throughout the Bible we notice the idea of true power residing and coming down from the position of the heavenly place.
“Then they said, “Come, let us build ourselves a city and a tower with its top in the heavens, and let us make a name for ourselves, lest we be dispersed over the face of the whole earth.””
Genesis 11:4
We see that kings valued the power of the heavens
“I have heard of you that the spirit of the gods is in you, and that light and understanding and excellent wisdom are found in you.”
Daniel 5:14
We see Jesus pointing out the need for first establishing dominion in the divine council of heaven before it is established on the earth
“Your kingdom come, your will be done, on earth as it is in heaven.”
Matthew 6:10
We understand that the nations were divided among the elohim and appointed different geographic regions on the earth that they ruled over, as well as different people groups
“When the Most High gave to the nations their inheritance, when he divided mankind, he fixed the borders of the peoples according to the number of the sons of God.”
Deuteronomy 32:8
but these gods resided in the heavens and represented man in the heavenly divine council in the sky.
“God has taken his place in the divine council; in the midst of the gods he holds judgment:”
Psalm 82:1
“For who in the skies can be compared to the Lord? Who among the heavenly beings is like the Lord, a God greatly to be feared in the council of the holy ones, and awesome above all who are around him?”
Psalm 89:6-7
We see that Paul makes the argument about where the real struggle is and it’s not on the earth with flesh and blood
“For we do not wrestle against flesh and blood, but against the rulers, against the authorities, against the cosmic powers over this present darkness, against the spiritual forces of evil in the heavenly places.”
Ephesians 6:12
These principalities or archons are the rulers of this age that wanted to kill Jesus Christ and curb their ultimate destruction in the eternal hell fire by preventing the restoration of man through redemption. Had they known that killing Jesus was the solution they would never have crucified Jesus
“None of the rulers of this age understood this, for if they had, they would not have crucified the Lord of glory.”
1 Corinthians 2:8
Verse in question reread
Now with all this cliff note style background and context read the verse again
“Again, the devil took him to a very high mountain and showed him all the kingdoms of the world and their glory.”
Matthew 4:8
Was Jesus on the mountain looking down, looking out or looking up?
A clue is in the Greek word being used βασιλειας and this is not the word for kingdom but the word used of power or principality or the right to rule. Where does this power reside? In castles and earthly regions? NO! This power resides in the heavenly places with the sons of God that corrupted themselves and became the gods of the nations. These gods gave their power to satan
And notice satan doesn’t offer Jesus kingdoms but authority which is consistent with the Greek word used here εξουσιαν and βασιλειας
“and said to him, “To you I will give all this authority and their glory, for it has been delivered to me, and I give it to whom I will.”
Luke 4:6
So what did satan show Jesus on top of that very high mountain? The principalities those with authority over the nations, so visually therefore Jesus was either looking straight on if the mountain was taller than the clouds or up above the clouds. And what Jesus saw was indeed the spiritual realm.
Flat Earth
With respect to whether the earth is flat, this is not a passage that proves the shape or more correctly the plane of the earth. Biblically the earth is flat, the cosmology is that of a flat earth but this verse doesn’t prove nor deny the earth’s form. Other verses in the Bible show that the earth is flat, stationary, covered by a firmament and the sun, moon and stars are local circling around the earth.