I would think that the earlier Kings such as Yao and Shun would not have recorded in a very historically accurate manner, however what of King Wen and the Duke of Zhou? These later Kings are thought to be the exemplars for Confucians, especially that of the Duke of Zhou.
The function of sages (圣人) in Confucian thought has almost nothing in common with the role Jesus plays in Christianity- if we have to make a Judeo-Christian analogy, it wouldn't be appropriate to even compare them to prophets. At best, they could be compared to especially prominent Hebrew kings like Solomon. From the Analects and Mengzi on, the orthodox Confucian position was that sages were no different from ordinary people at birth and only became exceptional through moral and intellectual cultivation. They were not demigods and they did not receive divine guidance (although this is muddied by the fact that the Three Sovereigns and Five Emperors of the mythical Xia dynasty were deified in Chinese folk religion).
Another point to keep in mind is that there is a distinction between the specific figures broadly recognized as 'sages' and the concept of the 'sage' itself. There was not a fixed set of sages in the same sense that there are strictly-defined lists of prophets in Abrahamic religions. Nor was sagedom associated with any kind of spiritual effects, as in Taoism (immortality) or Buddhism (nirvana; the end of the cycle of death and rebirth). A Confucian sage was someone who attained the most exemplary level of personal conduct, and it was assumed that this personal conduct was the expression of rigorous study and reflection, and that the result of this conduct was a well-ordered and peaceful society.
There was a tendency in Chinese thought to assume a past utopian society under the leadership of wise and selfless rulers and ministers, but this was not a Confucian invention. The same concept appears in the Taoist Laozi, which predates the Analects and belongs to a different school of thought. Confucians were not unique in asserting the existence of sage-kings like Yao, Shun and Yu, but they were unique in their emphasis on the study of ancient writings and emulation of ancient people. So the question of how these people came to be viewed as moral exemplars is only partly a question about Confucianism, since this view predates Kongzi and his school.
Regarding historicity, the Shang are associated with the Erlitou culture and the later Anyang settlement, with a number of specific Shang kings attested in oracle bone writings or bronze inscriptions. The Zhou are even more well-attested with the proliferation of written records during their reign. But the Xia are not firmly associated with anything in the archaeological record and are probably no more historically real than Theseus or Romulus.