There was a real nephew. Han Yu wrote poems addressed to a grand-nephew named Han Xiang, including one written on the road into exile at Lan Pass which tells the young man he has come far to see him off and asks him to collect his bones by the riverside. That poem is the seed of everything: the meeting at the pass is documented in the uncle's own words, and the tradition supplied the prophecy that made the meeting a fulfilment rather than a coincidence.
The historical Han Xiang appears to have been an ordinary official who took a post and left no particular mark. The transcendent Han Xiangzi, with the flute and the flowers, develops in later collections and reaches its full form on the Yuan and Ming stage, where the Eight Immortals were a standing subject and the tension between a Daoist adept and a Confucian statesman made good drama.
This is worth stating plainly because it is the general case for the group rather than the exception. Of the eight, several have a documented person somewhere underneath: a Han general, a Tang recluse summoned to court, a Tang scholar, a Song imperial relative, this nephew. What the tradition did was not invent people from nothing but attach a body of story to names that were already there, over several centuries, and then fix the set at eight. The atlas records the immortals as the tradition holds them and marks the historical anchor where one exists.