Jack, I'm going to answer your post bit by bit. This has been a field of study of my husband's and mine.
In the 1930's a fellow named Wiseman noticed something about the most ancient of tablets we have found in Mesopotamia. They were not signed at the top, or beginning, the way we title our documents now. Instead, they were signed off at the bottom with an interesting phrase: this is the generation of...
And he looked at the Bible. Genesis 5:1, 6:9, 10:1, 11:10, 11:27, etc. we see where the authors have signed off on their own eyewitness accounts of what happened in their lives. The first tablet, however, ends with Genesis 2:4a. So who wrote that one? Well, God wrote the Ten Commandments on stone Himself, so it is not a problem to attribute the opening of Genesis to the only Eyewitness who saw it: the Creator Himself.
Genesis does not give any indication that it is anything BUT eyewitness history. Details are remembered, conversations are remembered. There are no 'heros' of mythology there, but rather real people with real problems and real relationships. Warts and all.
You stated that Genesis 1 and Genesis 2 give two different orders of creation. No, they do not. There is a translation problems of two verbs, among other things, in Genesis 2. In Genesis 2:8, the pluperfect is absent from Hebrew and the correct translation should be "had planted". The same is in verse 19, where the Lord God "had formed". Thus, we find in Genesis 2, Adam's memories of those first days of his life.
Did the sun appear on day four after the first growth of plants? Yes, it did. If you study the formation of plasma currents and filaments, you will see how the entire universe was probably formed. In a single plasma filament, there forms, around its pinched middle, a 'string of beads' which follow each other in a circle, and finally swallow each other up until only the largest is left, circling the filament. Then, to the inside of that orbit, another string of beads is formed, and again only one will be left. This can happen several times, with each 'string of beads' forming inside the last. The final thing that happens is the 'lighting up' of what is left in the middle. That is how our solar system, and probably all solar systems, formed. The sun is the last part of each to light up, as it is in the middle.
So yes, the earth was formed before the sun. And yes, the plants were growing a day before our sun lit. The initial light for the earth probably came from the center of our galaxy, where there used to be a quasar. These are associated with the black holes as far out as we can see in space, and the further they are, the brighter the quasar; i.e. the longer ago, the brighter the quasar. With its light and the earth formed, plants were quite able to grow before the sun was formed.
When you mention that Moses may have decided to include what you consider contradictory accounts, and then the Hebrews consider the work to be inspired holy Scripture, you are in effect accusing the Hebrews of being incredibly stupid people. They weren't.
And no writing language existed early on? You will find that claim denied in Genesis 5:1.
Just because we don't have a full understanding of everything that happened doesn't mean it didn't happen. Man's brain and understanding are not the be all and end all of knowledge! God is the be all and end all of all understanding. And He attributes historical accuracy to Genesis in His words when He was incarnated as our Lord Jesus Christ.