The Book of Job was unquestionably written in a poetic style. But being poetry does not mean it is fiction. Ruth and Esther both have some poetic elements as well, and no one questions their historicity.
The Book of Job, however, was not written in the time period suggested by its placement among the books in the Old Testament. Being written by Moses, it is reasonable to conclude that it was written during his 40 years of tending sheep for his father-in-law in the land of Midian.
Moses' father-in-law went by more than one name, including Jethro (see Exodus 3:1), Reuel (Exodus 2:18), and Hobab (Judges 4:11; Numbers 10:29). Notably, he is called "the priest of Midian" (Exodus 3:1).
Midian was a grandson of Abraham, a second-cousin of Jacob, and it was the Midianites who traded Joseph into slavery in Egypt.
Then again Abraham took a wife, and her name was Keturah. (Genesis
And she bare him Zimran, and Jokshan, and Medan, and Midian, and
Ishbak, and Shuah. (Genesis 25:2, KJV)
Job is first mentioned in the Book of Genesis as a son of Issachar, who was one of Jacob's sons. This would have placed Job among those who lived in Egypt during the seven years of famine, and he would have been among those who tended the flocks and herds of the family there.
And the sons of Issachar; Tola, and Phuvah, and Job, and Shimron.
(Genesis 46:13, KJV)
He is later said to have come from the land of Uz, so he must have taken his share of the animals and moved to Uz before the slavery in Egypt had begun.
There was a man in the land of Uz, whose name was Job; and that man
was perfect and upright, and one that feared God, and eschewed evil.
(Job 1:1, KJV)
Uz was one of the sons of Shem, from whom Abraham also descended.
The sons of Shem; Elam, and Asshur, and Arphaxad, and Lud, and Aram,
and Uz, and Hul, and Gether, and Meshech. (1 Chronicles 1:17, KJV)
So the land of Uz would be a Semitic territory. Looking at a map, the land of Midian would have been nearly halfway from Egypt to the land of Uz.
Both Job and Moses were descendants of Jacob.
Putting the details together, we could place Job as almost a contemporary of Moses, with but two generations separating them; Job being Moses' elder. In fleeing to Midian, Moses would have been nearer to the extended family in that direction, and very likely became acquainted with Job's story during those years as a shepherd--which is when he would have written the book, along with the book of Genesis.
Evidence from the story of Job itself confirms this time period:
These were dukes of the sons of Esau: the sons of Eliphaz the
firstborn son of Esau; duke Teman, duke Omar, duke Zepho, duke Kenaz,
(Genesis 36:15, KJV)
This shows that Eliphaz and Teman were both descendants of Esau, Jacob's brother, and Job's reference to "Eliphaz the Temanite" would refer to a descendant from that family.
It appears that, yes, Job was a real man, the cousin of Moses' grandfather, and his story is true, even if the rich, liturgical dialogues of the book of Job may have been written with a touch of poetic license.