Consider the following imaginary world (I say “imaginary” not “possible” because I doubt this world is really metaphysically possible). There is a range of disembodied minds divided into different kinds in this world, analogous to animal species, numbering in the millions. There are also differences among the individuals belonging to each kind. These individuals can and do reproduce—they have children. They can also die, sometimes before reproducing. Our imaginary beings are completely immaterial and hence have no molecular parts. About these beings we can ask an origin question: how did they come to exist? One possible answer would be that they were created by another disembodied being, vastly superior to them, some 6,000 years ago. There was never any transformation of one species of mind into another; each species was created separately by an all-powerful God.
But there is another possible origin theory: the theory that the disembodied minds evolved by natural selection from relatively primitive origins. This theory postulates that there were once, billions of years ago, very simple disembodied minds, and these minds evolved by natural selection into the minds that we see today. How did this happen? When the minds reproduce, making copies of themselves, in the form of offspring, errors can be made—the copying isn’t always perfect. When an error occurs the offspring differs slightly from the parent, since the error is not corrected. The error produces a variation in the properties of the mind that is produced—say, we get a mind with a slightly higher IQ or a reduction of affect. Natural selection then operates to favor or disfavor the change, which then gets passed to the next generation, or fails to. These selected changes accumulate over long time periods, producing varieties of mind. Competition for reproductive mates gives further bite to natural selection, so that traits are favored that increase the probability of mating, and hence producing copies. In other words, we have random variation, self-replication, and natural selection operating together to generate the immaterial beings that exist in our imaginary world. There are no genes, no bodies, and no physical processes of any kind—but there is evolution by natural selection.
The lesson of this little thought experiment is that the basic explanatory scheme of Darwinian explanation is not essentially materialist. As things exist in our world, animals have material bodies, material genes, and material behavior: the mechanism of random variation, reproduction, and natural selection applies to material entities. But the mechanism itself is topic-neutral: it is sufficiently abstract to apply even to immaterial beings—so long as the basic conditions of variation, copying, and natural selection apply. Just as it is possible to run an evolutionary program on a computer, producing more complex patterns from simpler ones by random variation and natural selection, so it is possible to conceive a world that runs by Darwinian principles but is quite immaterial. Spirits could evolve by random mutation and natural selection, so far as the theory is concerned. Nothing in the theory itself entails that it applies only to material entities. Even gods could be subject to Darwinian evolution. How the abstract principles are implemented in different kinds of being differs from case to case, but the principles themselves are ontologically neutral.
Thus it is logically conceivable for a dualist like Descartes to be a Darwinian. On the one hand, the animal body evolves by material natural selection in the standard way, involving DNA. On the other hand, the immaterial mind itself evolves on a parallel but separate path: it is subject to internal changes (“mutations”) that can be passed on to the next mind, assuming that there is a parallel mechanism to the genetic one; and these changes can be selected for or against. As the body creates copies of itself using DNA, so the mind creates copies of itself using whatever immaterial resources it possesses. We have two-track Darwinian evolution to match the dualist ontology. No doubt no such thing happens in the actual world, but we can imagine a world in which body and mind, conceived as separate substances, evolve in parallel, both subject to Darwinian principles. So you can consistently be a Darwinian anti-creationist while also accepting Cartesian dualism, or even Berkleyan idealism. The logic of Darwinian explanation is neutral between metaphysical systems.