I have noticed that when Chinese depict their historical figures they are more often than not depicted as quite ugly. For instance, no one would consider confucius handsome, depicted with wrinkles, teeth poking out and visibly overweight. Whereas if we look at socrates, a figure often described as ugly, he's usually depicted with very flattering features - a full beard, defined muscles, masculine and healthy features, etc.
I have also noticed that if you look at modern movies this is also the case. Chinese characters such as Ne Zha in the 2019 Chinese animation is depicted as ugly, while the only western animation character I can think of which is depicted as ugly is the hunchback of notre dame, but here the character's ugliness is essential to the plot.
I am wondering if there is some fundamental difference in how Eastern and Western cultures perceive ugly.
Since this question has gone unanswered for quite a while let me contribute a (very) small part of an answer. I can’t answer the broader question pertaining to Chinese ideals of beauty and the need to represent historical figures as “beautiful“ (which is a truly enormous topic). However, I can talk a little about how Confucius himself has been represented (already an enormous topic in itself) and hopefully that will go some small way towards explaining why the picture you have linked looks the way it does. I am absolutely not an expert in this field and for a more authoritative look at the subject I recommend the writings of Julia K. Murray who has written much about Confucius and specifically the way he has been portrayed.
How Confucius has been depicted has varied considerably over the past 2,600 years or so. This is partly due to his complicated status in Chinese society. Throughout this time, Confucius has been recognised as a philosopher, an ancestor (whom his descendants could make offerings to), a deity who could benefit society, a deity who could benefit individuals, a historical figure, a genius unappreciated by unjust kings, a representation of great Chinese culture and more. Each of these interpretations brought with it different ways of portraying Confucius, and more than one portrayal could exist at a time. To draw a rough analogy, Napoleon Bonaparte was the subject of multiple paintings in his lifetime. However, Napoleon the warrior is depicted differently from Napoleon the emperor is depicted differently from Napoleon the leader and so forth. To answer the original question, in the varying interpretations of Confucius, beauty was rarely, if ever, a priority.
I can think of 2 particular interpretations that you might have seen that seem “ugly” – the representation of Confucius as a mythical sage, and the representation of Confucius as a wanderer. Let me first give some background:
The beginnings of the cult of Confucius and his representations
At the time of Confucius’s passing in 479BC, it was customary for the son of a deceased to lead funerary rites and carry out a period of mourning. In the case of Confucius, however, whose son had died before him, the mourning was carried out by his disciples, who were not related to him by blood. For generations after, local authorities in Confucius’s birthplace, Qufu, maintained offerings to him. In 195BC, the founder of the Han Dynasty travelled to Qufu to make sacrifices to Confucius.
In 220CE, the Han Dynasty fell, and during the period of Chinese disunity, individual kingdoms and regimes erected state-sponsored temples to Confucius so that they could continue sacrificing to Confucius and his legacy. In 241CE, for example, a sacrifice was carried out in the imperial university in Luoyang, capital of the kingdom of Wei, our first record of a sacrifice to Confucius being carried out outside Qufu.
Thus, by the time China was unified under the Tang Dynasty, the cult of Confucius was quite widely spread. In the 7th century, the Tang emperor Taizong then extended the cult “vertically”, by requiring that every prefectural and county school build a temple to Confucius.
At this time, the dynasty had codified the various rituals that had to be carried out. However, the instructions for these rites came from The Book of Rites, or the Li Ji, a compilation written during the Warring States Period (which is when Confucius was active) that described the rites of the Zhou Dynasty (which came before the Warring States Period). Because the cult of Confucius had grown out of his disciples mourning his death, which happened after the Zhou Dynasty, there wasn’t actually a prescribed set of rites in the Li Ji for sacrifices to Confucius, which in turn led to quite a bit of “innovation” in the sacrificial process.
During the Tang period, it became common for Chan Buddhists to use portraits in memorial rituals for deceased abbots and monks. Images of the Buddha and bodhisattvas also became common in Buddhist temples, and it is believed that, influenced by these practices, this is also when images of Confucius started to become common for use in rites and in temples.
Such influence can be seen in a description of a statue of Confucius in Qufu by the Chinese Geographer Li Daoyuan. He reported that he was flanked by two disciples holding scrolls, which was a very common composition in 6th century Buddhist art (the Buddha flanked by two bodhisattvas).
Representation of Confucius as a titled figure
As the cult of Confucius grew, various emperor conferred upon him posthumous titles. The first to do so was the Han emperor Pingdi in 1CE, who made him a duke. In 739, Tang Xuanzong made him the King of Propagating Culture. As the list of titles grew in number and importance, the representation of Confucius in his temples changed. There were laws governing what each rank of nobility was allowed to wear, and because one was now representing a noble figure, the dress of Confucius had to accurately reflect his title. For example, as king, Confucius had to be represented wearing a robe embroidered with nine emblems and a crown with nine strings of jade beads hanging at the front and back (the emperor would have 12 strings).
Other emperors would confer other titles on Confucius, or sometimes simply upgrade the iconography, for example, by increasing the number of strings, without upgrading his title.
Representation of Confucius as Sage
Confucius wasn’t the only one being given titles, a whole host of Taoist and Buddhist deities were also designated as kings and dukes and what have you. Confucius was supposed to be a “special case”. Only a male elite could perform sacrifices to Confucius, and he was not asked to confer individual benefit but rather benefit for society at large.
However, because Tang Taizong had ensured that his temples were widely spread, the icon of Confucius was now readily available to the general population. And as the iconography of the various deities became quite similar (Confucius the king and a Buddhist “king” would be dressed similarly), Confucius started to become recognised not as a elite cult figure but as a popular deity. For example, the belief that the spirit of Confucius would inhabit his image after the appropriate rituals were performed, similar to Taoist and Buddhist inspired folk beliefs. In another example, the Buddha Sakyamuni is said to have had 32 marks that distinguished him from ordinary mortals. Likewise, the idea that Confucius had 49 marks (四十九表)that showed that he was a great sage became popular.
These include "sunken face", “horse teeth”, “cow lips”, “turtle back” and "long ear lobes" (interestingly, also a mark of the Buddha having worn heavy earrings when he was a prince), and were naturally “out there” to show how special he was. Among the marks are a height of 9 feet and 6 inches, and a waist of 6 metres diameter or more (that's the literal meaning, figuratively it could simply mean he had an exceedingly thick waist). It’s possible that the imagery you have seen tries to incorporate some of these marks.
Representation of Confucius as a wanderer/ordinary man
During the Song and Ming dynasties, Confucian scholars became increasingly concerned that treating Confucius as some kind of folk deity would cheapen the cult. In addition, it was recognised that worshipping these images of Confucius were simply an invention of recent centuries and not the “primordial” form of sacrificial rites. Eventually, in 1530, the Jiajing emperor stripped Confucius of all his noble titles, henceforth he was to be designated as Ultimate Sage and First Teacher, emphasising his role as a teacher rather than as a nobleman. He also decreed that there were to be no more images of Confucius in temples except in his ancestral temple in Qufu. Everywhere else he would simply be represented by a tablet.
Since Confucius was now a teacher, but still a historical figure who represented something, there was still demand for portraits, rubbings and so forth. Maybe not for worship, but for inspiration, hanging in school halls and taking no part in rituals.
It thus became popular to take inspiration from the time of Confucius’s wanderings during the Warring States Period, and portray him as an ordinary wanderer. He was dressed simply, and sometimes, to emphasise just how ordinary he was, he was deliberately given buck teeth and shaggy facial hair. It is said that he was in his fifties by the time he started wandering, and old age is associated with wisdom, so he was portrayed as an old man. This, again, could be why you have come across pictures of Confucius that look “not beautiful”.