From an entry in the International Dictionary of Psychoanalysis about Darwin's impact on Freud's writing, an insightful paragraph:
In 1859, when Charles Darwin published The Origin of Species, Sigmond Freud was three years old. As a young student and later, during his early years as a dedicated scientific researcher, Freud greatly admired Darwin, who had gained considerable popularity throughout Europe. In his Autobiographical Study, Freud would recall that "Darwin's doctrine, then in vogue, was a powerful attraction, since it promised to provide an extraordinary thrust to understanding the universe" (1925d). From then on Darwin joined Hannibal in Freud's personal pantheon and he dreamed of becoming his equal. In "A Difficulty in the Path of Psycho-Analysis," he described the three wounds inflicted on humanity's pride: when Copernicus established that the earth was not the center of the universe, when Darwin proved that mankind developed in an unbroken line from other animal species, and when he, Freud, showed that man did not have control over the most important aspects of his own mental processes(1917a).
Friedrich Nietzsche, while having a very different view of social evolution, nonetheless finds Darwin's ideas worthy of direct engagement, for example in this quotation from Twilight of the Gods:
Anti-Darwin. — As for the famous “struggle for existence,” so far it seems to me to be asserted rather than proved. It occurs, but as an exception; the total appearance of life is not the extremity, not starvation, but rather riches, profusion, even absurd squandering — and where there is struggle, it is a
struggle for power. One should not mistake Malthus for nature. Assuming, however, that there is such a struggle for existence — and, indeed, it occurs — its result is unfortunately the opposite of what Darwin’s school desires, and of what one might perhaps desire with them — namely, in favor of the strong, the privileged, the fortunate exceptions.
The species do not grow in perfection: the weak prevail over the strong again and again, for they are the great majority — and they are also more intelligent. Darwin forgot the spirit (that is English!); the weak have more spirit. One must need spirit to acquire spirit; one loses it when one no longer needs it. Whoever has strength dispenses with the spirit (“Let it go!” they think in Germany today; “the Reich must still remain to us”). It will be noted that by “spirit” I mean care, patience, cunning, simulation, great self-control, and everything that is mimicry (the latter includes a great deal of so-called virtue).