The Talmud at Bava Basra 14b-15b teaches that Moses wrote the Book of Job before the Exodus. If so, was he a contemporary and a witness to Job's suffering, was he describing a historical figure he didn't know, or was it simply an inspirational fable?
There are many different opinions regarding when Iyov existed, if at all. Many are mentioned in the Talmud you cited in your question.
The Talmud (Sotah 35A) brings an opinion that Iyov died shortly before the spied entered the land, a little more than a year after the Jews left Egypt.
The Talmud (Babba Batra 15A) (translation here) says that Moshe told the spies to see if Iyov was in the land.
The Talmud there also brings an opinion that 'The span of Job's life was from the time that Israel entered Egypt till they left it.'
According to Iyov 42:16, Iyov lived 140 years after his suffering. Since Moshe was only 80 at the time of the Exodus, he would not have seen Iyov's suffering.
The following possibilities are mentioned in the Talmud in Bava Batra 15a-15b for when Job lived. Some of them are derived from Scriptural verses, and some of them are questioned. (All translations from Soncino).
- איוב בימי משה היה — Job was contemporary with Moses
- ואימא בימי יצחק — I might say that he was contemporary with Isaac
- ואימא בימי יעקב — Or I might say that he was contemporary with Jacob
- ואימא בימי יוסף — or with Joseph
- איוב בימי מרגלים היה — Job was in the time of the spies
- איוב לא היה ולא נברא אלא משל היה — Job never was and never existed, but is only a typical figure
- איוב מעולי גולה היה — Job was among those who returned from the [Babylonian] Exile,
- ימי שנותיו של איוב משעה שנכנסו ישראל למצרים ועד שיצאו — The span of Job's life was from the time that Israel entered Egypt till they left it
- איוב בימי שפוט השופטים היה — Job was in the days ‘of the judging of the judges’
- איוב בימי אחשורוש היה — Job was in the time of Ahasuerus
- ואימא בימי דוד — But perhaps he was in the time of David
- איוב בימי מלכות שבא היה — Job was in the time of the kingdom of Sheba
- איוב בימי כשדים היה — he was in the time of the Chaldeans
- איוב בימי יעקב היה — Job lived in the time of Jacob
Maimonides in Guide for the Perplexed 3:22 assumes that Job never existed, in part because of the so many differing opinions as to when he lived:
THE strange and wonderful Book of Job treats of the same subject as we are discussing; its basis is a fiction, conceived for the purpose of explaining the different opinions which people hold on Divine Providence. You know that some of our Sages clearly stated Job has never existed, and has never been created, and that he is a poetic fiction. Those who assume that he has existed, and that the book is historical, are unable to determine when and where Job lived. Some of our Sages say that he lived in the days of the Patriarchs; others hold that he was a contemporary of Moses; others place him in the days of David, and again others believe that he was one of those who returned from the Babylonian exile. This difference of opinion supports the assumption that he has never existed in reality. But whether he has existed or not, that which is related of him is an experience of frequent occurrence, is a source of perplexity to all thinkers, and has suggested the above-mentioned opinions on God's Omniscience and Providence. (Friedlander translation)
Interestingly, R. Joseph Ibn Kaspi (who is usually the one that gets accused of being radical) in the beginning of his explanation of the Book of Job takes strong issue with the position that Job never existed. He writes that such an idea basically destroys the entire Torah. If we can say that a Sciptural book which says "there was a man in the land of Utz" is really just an allegory, then what stops us from saying that about other Scriptural books? Perhaps the books of Samuel, Ruth, and Esther are only allegories? Perhaps the story of Noah and the ark and the flood is just an allegory? Following this approach we have no Torah or Scripture.
Ibn Kaspi says that if he wanted to he could explain the Book of Esther allegorically. Ahasuerus represents God, Haman represents Satan, etc. But heaven forfend to allegorize Scripture like this, except in instances where philosophical principles demand it.
Therefore, concludes Ibn Kaspi, Job certainly existed, and if the ancient authorities couldn't figure out when he lived — who cares?!
Basically there are multiple valid opinions.
Various midrashim put him roughly around the same period as Moshe (though Sforno reads that "Utz", a nephew of Avraham's, is in fact "the man from the land of Utz" i.e. Iyov). There's another opinion that the story is in fact fiction, "Iyov never existed and never was created."
if Job never existed, and has never been created, and that he is a poetic fiction, how can G0d Equate him with noah and daniel, isn't the denial of the historical identity of job also an denial of noah and daniel ones?
13-"Son of man, if a land sins against Me by trespassing grievously, I shall stretch forth My hand upon it and break its staff of bread, and I shall send famine upon it and cut off from it [both] man and beast.
14-Now should these three men be in its midst-[namely] Noah, Daniel, and Job-they would save themselves with their righteousness, says the Lord God.
15-If I would cause wild beasts to pass through the land and they bereave it, and it becomes desolate without a passerby because of the beasts,
16-[Even] these three men [would be] in its midst, as I live-says the Lord God-if they would save sons or daughters! They alone would be saved, but the land would be desolate.
17-Or [if] I bring a sword upon that land and say, 'Let a sword pass through the land, and I shall cut off from it [both] man and beast.'
18-And these three men are in its midst, and I live-says the Lord God-they will not save sons and daughters, but they alone will be saved.
19-Or if I send forth a pestilence to that land and pour out My fury upon it [and] upon blood, to cut off from it man and beast,
20-And Noah, Daniel, and Job are in its midst, as I live, says the Lord God, if they will save a son or a daughter; they with their righteousness would save themselves.
21-For so said the Lord God: How much more when I send [all] four of my evil judgments-sword, famine, wild beasts, and pestilence-against Jerusalem, [ought I] to cut off from it man and beast.
22-But behold, a remnant remains therein: the sons and daughters who are being brought out. Behold they are coming out to you, and you will see their way and their deeds, and you will be comforted over the evil that I have brought upon Jerusalem- all that I have brought upon it.
23-And they will comfort you, because you will see their way and their deeds, and you will know that not for naught have I done all that I have done in it," says the Lord God.