It varied, and it depended on the exact circumstances of the sentence, but it wasn't always bad. That being said, being forced to move to a remote frontier was not a particularly pleasant turn of events.
As a bit of background, it is important to remember the precedent in China for scholar-officials to withdraw from society if they believed their ruler to be unjust. This dated back to before the imperial era, as seen with noted figures such as the brothers Boyi and Shuqi, who disengaged in civilization in order to protest the militaristic actions of King Wu of Zhou, who had led an army to overthrow the Shang dynasty. Boyi and Shuqi were so principled in their protest that they refused to eat anything which was owned by the Zhou, and subsequently starved themselves to death. Confucius briefly touches upon their case and others in the Analects (18.8), although he is more ambivalent. Several times he encounters noble hermits or secret scholars and his reaction in many cases is to more or less shrug and say that some actions are appropriate at some times, and not at others.
Nonetheless, this sort of voluntary exile was very common and lays the groundwork for what happens in the case of involuntary exile -- that is, exile as ordered as part of a punitive sentence? My strength is mostly on the Ming dynasty, but as I will explain later it is reasonable to assume that the general expectations would have remained more or less constant. So! Let us turn to the specific case of Yang Jisheng (楊繼盛), mostly because I read the excellent book about him by Kenneth Hammond (Pepper Mountain: The Life, Death, and Posthumous Career of Yang Jisheng), who actually goes over the very question you asked regarding the typical outcomes of a western exile.
During the reign of the Jiajing Emperor, of the Ming dynasty, a lot of the proceedings of the court were dominated by the minister Yan Song. The specifics of his policy choices are irrelevant (he was in favor of negotiation with the Oirat Mongols instead of responding militarily to their raids, and then dropped that idea like a hot potato when it failed) although it is highly pertinent that Yan Song was widely regarded as corrupt, and his son was even worse. Eventually, a brave junior official named Shen Lian publicly denounced Yan Song and was immediately arrested, beaten, and posted off to some greatly diminished post on the frontier. But crucially, Shen Lian was not stripped of his degree, nor was he killed, so he remained within the imperial bureaucracy and was still eligible for promotion, assuming he survived. (He didn't; several years later, Yan Song would have Shen Lian executed before he had a chance to return, as the result of a paranoid fit. Yan Song was not a nice guy.)
Professor Hammond makes the argument that this was a risky yet common way for officials to win recognition for themselves as morally upright voices, and even to win advancement. Yang Jisheng thus did the exact same thing, publishing a document critical of Yan Song, and was himself arrested, beaten, and sent to a junior post in what is now Lintao, Gansu Province. While in exile, he was not held in confinement, nor was he subjected to further physical punishment -- he was, as with Shen Lian, still an official of the government, albeit acting in diminished capacity. Yang's own autobiography notes that he was careful to avoid stepping on the toes of the local government, who were apparently afraid that he'd think himself better than them and cause chaos. Instead, he took charge of matters in education, establishing a new school for the area, as well as negotiating the opening of a coal mine and investigating tax fraud.
Yang's story almost ended on a happy note -- his gamble paid off, and after several of Yan Song's political allies fell from grace over the failed negotiations with the Oirats Yang found himself recalled from the frontier and promoted rapidly (probably at the arrangement of Yan Song, who was at this point looking for new allies). Unfortunately, Yang Jisheng immediately went and published another letter denouncing Yan Song as corrupt and misguided, and this time he was beheaded. However, following the death of Yan Song and the advancement of new ministers and emperors, his (Yang's) name was rehabilitated and his descendants were granted various honors in the court.
The reason why I believe that these events are relevant to your question, which specifically mentioned the Qing, is that the Qing dynasty sought to preserve as much as they could of the preceding Ming customs, as they were very conscious of their status as outsiders who had overthrown the Ming by essentially presenting themselves as more Chinese and worthy of rule than the present rulers. In fact, the story of Yang Jisheng was well-known to the Qing monarchs: the Shunzhi Emperor commissioned plays about Yang's life, and three poems about Yang Jisheng have been attributed to the Qianlong Emperor. So they would have continued the standards set out by the Ming when it came to judicial punishments, as can be seen from the various Qing-era exiles. Xu Song, for instance, spent his time out west writing poetry and recording local history. In any case, while living in the region was not especially pleasant, it was not especially unpleasant, either. Yang Jisheng spent considerable time in his memoirs recounting his various sufferings in prison while waiting to be executed, but did not cast aspersions upon the village where he was posted in exile -- in fact, he had nothing but praise for the place.
I am afraid that a number of relevant texts are either not widely available to the public or are not yet translated into English; however, there are a few English-language scholars (Professor Hammond among them) who have made some level of study on this very specific situation.
While u/RexSueciae gave a good answer, Ming-era Gansu is a poor substitution for Qing-era Xinjiang. They were two completely different places with completely different ecological and cultural backgrounds. As Peter Perdue noted in China Marches West, Xinjiang, as we know of it today, was really a Qing dynasty construct, specifically during the Qianlong era when the Zunghars were wiped out as a race and Han settlement was promoted.
One thing we have to note first is that official banishment to Xinjiang differed from common exile. The Qing sent many criminals to Xinjiang to form exile colonies so that they could reclaim land and build infrastructure. Qing officials who were banished there did not have to farm. Of course, whether or not an official could minimize his suffering in Xinjiang really depended on the severity of the crime, but from the records of some prominent exiles, it seemed that even though they were exiled, they were apparently allowed to go with enough money to live comfortably in Xinjiang.
To quote Perdue's China Marches West, pp. 428-429:
One individual, from the highest rank of the literati class, left a vivid portrait of his brief sojourn in Xinjiang that expresses a personal perspective on the northwest frontier. Ji Yun (1724–1805), a native of Zhili, obtained his jinshi degree at the young age of thirty and soon gained the prestigious post of Hanlin compiler. He then spent two years in exile from 1769 to 1770 in Ürümchi because of his involvement in a bribery case. After his return with an imperial pardon, he regained his prominence, becoming one of the chief editors of the great imperial encyclopedia, the Siku Quanshu. On the way home between Barköl and Hami, traveling frosty roads and stop- ping in lonely hostels, he wrote 160 poems about his experience on the frontier, later published as Miscellaneous Poems of Ürümchi (Wulumuqi Zashi).
Ji Yun’s poems express the personal reactions of one member of the cultured Qing elite to the raw but invigorating new territories that had joined the empire. He did not regret his experience or complain about his sufferings. He enjoyed the bustling life of the city, with its tightly packed shops, its crowds of shoppers, its brothels, and flute music in the evenings. He could also boast about the natural wonders of Xinjiang, describing the marvelous mountain torrents that burst out so fast they flowed uphill over the dams built to control them, or the powerful winds that “blew men and horses around like whirling leaves.” He toured ancient ruins and mused on their origins, and he discussed local legends with the remaining Mongols. Ji Yun fully embraced the developmental ethic of Qing officials and tried to make himself useful by constructing a reservoir. Local people put him off with objections until he had to go home.
In Ji Yun’s poetry we sense the exhilaration of mastery, represented by the new conquests that indicated new powers over man and nature. He claimed that the weather had changed since the conquest: Ürümchi used to be cold and barren, but now with the home fires burning from thousands of new settlers, the entire region had become warmer. He showed no nostalgia for the lost primitive cultures of the Mongols or Hui, and he praised the abundant yields from the military colonies. Ji Yun’s writings expressed in personal form the official policies of integration and development for the northwest. They broadcast exotic information about and enthusiasm for the new possessions of the empire to the literati audience back home. The long tradition of “border poetry” usually depicted this frontier as a place of forlorn exile, but Ji Yun, at least temporarily, had made it his home. The domesticated frontier now became another resource to be added to the Qing literary tradition.
As for Lin Zexu, he was banished because the Qing needed a scapegoat in the aftermath of the Opium War debacle. As with Ji Yun, the court only half-heartedly banished Lin Zexu. When he arrived in Xinjiang, he was welcomed by local officials and elites and there were banquets held for him. We also know that he was involved with local irrigation projects and land reclamation programs. And as with Ji Yun, Lin Zexu was later recalled back to Beijing and given a high position. Hong Liangji's exile was also later rescinded.
So basically, common criminals exiled to Xinjiang had to work in hard labor and stay there in perpetuity. Most minor officials probably did not have a good time either. But for prominent officials and figures, it seemed that exile to Xinjiang was not too full of suffering and it was almost always temporary.