Quran says the earth is a sphere!!
He created the heavens and the earth in true (proportions): He makes the Night overlap the Day, and the Day overlap the Night: He has subjected the sun and the moon (to His law): Each one follows a course for a time appointed. Is not He the Exalted in Power - He Who forgives again and again? [Quran 39:5]
Most translators use the word "overlap" etc for translating
كَوِّرُ (kawiru). But if you refer to the arabic root
كَوِّرُ (kawiru) it means "ball" as a verb. (Paste the word in google translate and see for yourself! It will tell you "ball" as a verb or see refrence below). Literally "ball like mass or core" actually.
So this verse says Allah created the heavens and the earth and "bowls" the night on the day and "bowls" the day overnight. This practically describes the relation of the earth wrt to night and day.... a ball like motion !!
Many would argue that this is in reference to the night or day and not the earth. But the night or day are NOT physical entities to have a ball like motion but are a resultant of the earth having a ball like motion.
I have identified 3 verses in the question (forgive me if I have missed any other). I will try to answer in short here for each. But if you need a detailed explanation of these 3 or any other verse feel free to open it as an individual question for a more detailed answer.
Verses you mentioned in your question
None of the verses mentioned actually indicate the earth's shape being flat or sphere
1) "Earth Spread" [79:30]
If you take a sphere (globe) and cover it with a cloth, you would be spreading it with the cloth but it would still be a sphere. So this in no way indicates the earth to be flat. Just talks about "spreading".
Let’s assume we want to cover a table tennis ball with glitter for decoration. You would probably take a glue stick & SPREAD the glue on the ball. "Spreading" has nothing to do with the shape.
2) "he (Dhul-Qarnain) found it setting in a spring of black muddy (or hot) water" [18:86]
Just because Dhul-Qarnain saw it as setting in a spring does not indicate that it actually is setting in the water. Today WE ALL call it "sunset" but does the sun really set? It’s just the usage of the language.
Similarly, when we call Japan the "land of the rising sun" does the sun really fly up from Japan? The word "Japan" is the Romanization of the word "Nippon", which means "where the sun originates". This was Japan's name during the Sui Dynasty. If you translate that phrase to arabic it roughly comes to
مشرق الشَّمْسِ (mashrik ash-shams) or "where the sun rises". The word
مَغْرِبَ الشَّمْسِ (magrab ash-shams) which is used in this verse could mean a place too and is translated as "where the sun sets".
Another example of current Arabic usage is the word
مَغْرِبَ (magrab) can mean "a place of setting" but in context it can simply mean "Morocco" as in the country of "Morocco".
Allah knows better where Dhul-Qarnain was travelling. BUT this has nothing to do with the shape of the earth.
3) "Mountains as pegs" [78:6-7]
Here I would refer you to look at the phenomenon of mountains "folding". This phenomenon makes two masses of land lock into each other creating the mountain. The mountain is an overlap of the mass of land. So when there is any seismic activity (earthquake etc.) it prevents it from shaking.
This "folding" phenomenon is the reason why the height of certain mountains can be seen increase every year.
But to explain in simple terms...
Let’s assume you buy a bed and the bed is very shaky. If you nail one end of the bed to the wall, you will notice that it will stop to shake as much. So in this case, the end of the bed that you nailed to the wall actually prevents it from shaking.
This again has nothing to do with the shape of the earth.