There is variance in egg shape; sea-birds often use a more pear or conical shaped egg to prevent it from rolling off the cliff (where they nest) if it is disturbed. Some reptiles lay very spherical eggs (some turtles) whereas some reptiles lay very elongated ones (see black pine snake eggs).
I imagine that we don't see square eggs because they would be difficult to shape and difficult to lay. Shape may also influence strength.
Google your question (like I did after writing the above) and it will come up with this article which pretty much says what I just did. Here are some of the author's key points...
"If eggs were rectangular little boxes, they would be very strong on the corners, but very weak in the middle of the straight walls."
"The strongest shape of all is a ball, or sphere. But if you were to push or gently nudge a spherical egg, it would roll away downhill, never to be seen again."
"So one reason that eggs have an asymmetric tapered oval shape is that if you nudge them, they'll come back to you. They'll sweep out a circle around the pointed end, and come to a stop with the pointed end facing uphill. In fact, the eggs of birds that have their nests on cliffs are more oval than the eggs of birds that nest on the ground. This means the 'more-oval' eggs of these cliff-nesting birds will roll in a very tight little circle, and be less likely to roll out of the nest — and off the cliff."
"Another reason for eggs to be egg-shaped is that they fit together quite snugly in the nest, with only small air spaces between them. "
"Yet another reason that eggs are tapered is so that they can get pushed out of the hen."