Yeah, that is a Fuck Shit Terrifying Idea that seems plausible on the surface. Fortunately, I think you're wrong, for a number of reasons:
I don't think the Black Death would've killed off exclusively the most altruistic, community-focused members of society. I think it's certainly plausible that it would have killed more of them than those who tended to self-isolate, but simply avoiding the high-risk activities (assuming a medieval peasant with no knowledge of germ theory would correctly identify them) no more guarantees safety than actively engaging in those same activities would guarantee infection. We learned this lesson most recently from COVIDāsome of the most cautious low-risk individuals still got sick, while a few ardent anti-mask/antivaxxers somehow managed to stay healthy. The Black Death might have exerted a small degree of evolutionary pressure towards avoiding social behaviors, but it probably wouldn't have been significant in the grand scheme of things.
It presumes that the survivors possessed a genetic, hereditary predisposition for their lack of prosocial behaviors. Anecdotally speaking, this doesn't match my experience. I know tons of people who are absolutely wonderful in spite of their parents, as well as a few who exhibit the opposite contradiction. While genetics do play a role in how people behave, I think the environment that they are surrounded by also plays a huge role. Someone who was raised in a family that was highly suspicious of others could radically differ in their reaction to strangers, being very warm and friendly. Plus, it's not like you can just draw up a Punnet square for the "prone to atrocities" gene. There's hundreds, if not thousands, of genes that are involved in human personalities, to say nothing of the number of alleles. Cooperation has been an essential part of the human survival strategy since before we diverged from apesāa hundred or even a five hundred years of plague isn't going to erase that. It'd take a hundred generations AT MINIMUM before that kind of change was noticeable.
It doesn't acknowledge the other concurrent factors that led to Europe's population decline. The Little Ice Age, a brief period of regional cooling in the North Atlantic, contributed to quite a few crop failures and faminesānot a situation in which an aversion to interacting outside of one's circle is an advantageous trait. If there were particular traits that the Black Death selected for, and those traits had somehow become noticeably more prevalent, there would just as quickly be similar evolutionary pressure back the other direction, back towards sociability.
The Black Death killed 2/3 of those it infected, not totalāthough to be fair, that was still most of Europe. Most of the numbers I could find put the raw death toll somewhere between 30%-50% of the total population, with a few sites saying "up to 60% in some areas". That's obviously still catastrophic for human civilization, but genetically speaking, there should have still been plenty of diversity in the surviving 50%-70%. For comparison, there's evidence that at around 5,000 BC, there was a massive decrease in Y-chromosome diversity in the Afro-Eurasian gene pool consistent with a ratio of 1 reproducing man for every 17 reproducing women. That is a significant genetic bottleneck (side note: I wonder if this contributed to the prevalence of polygamy across ancient civilizations?).
Personally, I don't see colonialism as a uniquely European action. Large, expansionist empires are by no means found only in Europe. Just look at the Mongols, Persians, Islamic Caliphates, Aztec, and Inca. As for why it was Europe that were the global colonizers, as opposed to someone else, I could easily write a full book (and I know of many that already exist) I'll try to keep it to just a few paragraphs:
During the Late Middle Ages (1300-1500), Europe experienced dramatic social and political unrest (thanks to the destabilizing effects of the Black Death), but also began to join the rest of the world in studying the sciences in earnest. In my opinion, one of the most notable technologies that came from this period was the expansion of spherical trigonometry, developed by Muslims in order to better calculate the direction of Mecca from an arbitrary point on Earth. This, along with the invention of the navigational compass and increasingly accurate astronomical observations, opened the door to reliable transoceanic navigation.
At the same time, the Ottoman Empire expanded to the East, closing the traditional land routes Europe had relied on and giving them the push necessary to try the riskier sea routes. Spain and Portugal, having only just finished driving the Moors out of the Iberian peninsula (a process begun in 718, centuries before the Black Death), were particularly resource hungry and immediately began naval expeditions to try to get direct access to the African and Asian markets, without having to pay their long-fought Muslim adversaries. One of these expeditions was Christopher Columbus, seeking a western route to China and India.
The Americas proved to be both valuable and easily conquered (especially for a civilization that had been fighting for hundreds of years). While Spain swiftly dispatched the existing American empires, Portugal succeeded in establishing an eastern naval passage. Both countries' ventures were immensely successful, leading the other major European powers (Britain, France, Belgium, and eventually the Netherlands after obtaining independence from Spain) to follow suit.
The reason the other major world powers didn't join Europe in colonizing the new world is because they didn't need to. Africa had extensive salt and gold mines and was already extremely wealthy, plus their empires were mostly inland and so lacked the ability to travel long distances by sea. The Ottomans already had land access to the Asian and African markets, and they mistakenly believed that control of the Americas would not dramatically shift the balance of power. As for the Chinese, their interests were more for maintaining and developing their existing trade networks, and would have had to cross the much larger and more difficult Pacific in order to reach the Americas.
In the end, the resources Europe extracted from the Americas (and the technologies developed for the wars they fought in the process) gave them an overwhelming advantage in the Old World, enabling them to expand their empires into Africa and Asia as well. I don't consider their expansion to be any different from the expansion of other civilizations throughout history, the only difference is the scale on which it happened. Forced migrations, destruction of original culture, and genocide aren't all present in every empire, but enough of them to say that it's not something Europe came up with themselves. If another group/empire were positioned in a way that colonialism like that of Europe's would've made sense, there's no doubt in my mind that they would've jumped at the opportunity. In a sense, that's exactly what the Japanese were trying to do to China in WWII (though they were ultimately defeated), and they did awful, awful things there.
In regard to the question of racism, I think your original idea is sadly correct in principle, but too narrow in who you applied it to. ALL humans are biologically wired in a way that we instinctively prefer those who are familiar, and reject those who aren't. People deal with discomfort by finding some excuse to justify it, and then you get that codified into a social norm, then law, until it becomes a whole institution of oppression. Racism is one particularly nasty product of this tendency, but it's not just limited to race: sexism, nationalism, ableism, and just about every other "-ism" also originate here (not autism though, that's something else).
Slavery is kind of an extension of that innate "-ism"-nessāanyone can think to use force to extract labor out of a population, and it's easier to do to a group you consider inferior. I'm pretty sure just about every major civilization prior to the last thousand years or so had well-established slavery practices. Of course, it's taken on many forms, and some were/are worse than others, but the core principle remains the same: those in power get free labor from those with none.
The reason we focus on European/white imperialism and colonialism is that it happens to be the most recent, with the most obviously visible effects. Had history gone slightly differently, we might be complaining about Asian or Arab colonialism (probably not Africa, their geography isn't good for thatābut that's another post).
I'm not sure if saying that humanity in general is prone to doing terrible things to others if it's in their self-interest is less bleak than leaving it solely to white people but least it gets rid of the eugenics flavor to it. It also means that everyone is equally capable of kindness and virtue, which I think is the more hopeful way to look at it.