Assalamu alaikum wa rehmatullahi wa barakatuh
The exact shape is not mentioned in Quran,but there are many verses which clearly suggest that Earth is spherical or spheroid.
1.He created the heavens and earth in truth. He wraps the night over the day and wraps the day over the night and has subjected the sun and the moon, each running [its course] for a specified term. Unquestionably, He is the Exalted in Might, the Perpetual Forgiver(Surah Zumr 5)
The shape is such that it allows running.
2.And after that He spread the earth.(Surah Naaziaat 30)
The shape is like something spread out or expanded or extended,and if anything is expanded or extended equally in all directions,the shape could not be triangular or cuboid or streamlined but it is more closer to a spherical shape.
3.He created the heavens without pillars that you see and has cast into the earth firmly set mountains, lest it should shift with you, and dispersed therein from every creature. And We sent down rain from the sky and made grow therein [plants] of every noble kind.(Surah Luqman 10)
The shape is Unstable,the overlying crust could be shifted and so it is fixed by mountains.
So the main hints which we have about the shape of the Earth are:
2.Allowing free movement,offering least resistance and so making it to “run” in its course.
3.Just like something expanded or spread out.
Among all of these shapes,the 3 hints point towards a spherical shape only.Sphere has least drag coefficient and so running could be possible,sphere is unstable and if anything is applied over it,it could be shifted easily and the third point is that,anything expanded equally,the resulting shape becomes spherical.
Many non muslims shout that the Earth is not spherical,its oblate or ellipsoid.The answer is that the original shape or the main shape was spherical and which has later on become oblate or ellipsoid,due to gravity and continued revolution.(wikipedia)
Secondly some people are confused about the verses (Surah Taha 53,Surah Zukhruf 10,Surah baqarah 22,Surah Dhariaat 48) which mention that Earth is flattened like a bed.
[He] who made for you the earth a bed and the sky a ceiling and sent down from the sky, rain and brought forth thereby fruits as provision for you. So do not attribute to Allah equals while you know [that there is nothing similar to Him].(Surah Baqarah 22)
And what is meant by making the Earth as a bed is mentioned in Surah Dhariaat.
And the earth, We have laid it out (as) a bedding, so how excellent are the Smoothers! (surah Dhariyaat 48)
It is smoothing.The Earth has mountains and rivers.There are many different landscapes and thus it is important to mention that even then,the Earth is flattened like a bed,it is smoothed out for our convenience.