Is it possible that, through any plausible history of alien life, and any plausible method of propogation for a self-replicating spacecraft, that the universe, as seen from present day Earth, could be inhabited by self-replicating spacecraft that have gone feral and settled into distinct niches like planetary life?
You have a number of key words in your title:
ecosystem of feral self-replicating spacecraft
In order of formation:
Spacecraft can be built by an Earth-like civilisation. Let's assume that they came from Earth, where we know life exists , about 66 million years ago - built by the dinosaurs slightly before they had an extinction event. (Probably for unrelated reasons, but we'll get to that.)
Self-replicating spacecraft are trickier, but are theoretically within reach. Given 5000 years more, the 'simple matter of programming' may be solved even by humans. Since we're starting a few million years ago, even 5 millennia is insignificant.
Feral spacecraft are trickier, but much more likely if they're self-replicating. How they've escaped control is the preserve of your story, but we could assume that someone uploaded an AI to one and it had different priorities to its creators. It's relatively straightforward for it to arrange an 'accident' for them if it's patient.
An ecosystem is unlikely to evolve from this system in plausible time. DNA is a fairly stable storage mechanism, but an AI can actively error-check itself and build more redundancy over time. So no, an ecosystem (competing, different forms of life) is far less likely than a mega-system of interacting robots working on the AI's chosen project(s). However, if the AI has different instances which disagree, you might rapidly see this.
Assuming that there's some kind of intelligence, it's entirely plausible that almost every star nearby will have some kind of AI installation interacting it. This galaxy is about 100K ly in diameter. So the AI can easily traverse and colonise it if it can manage 'only' 5000 km/s (1/60 c) in interstellar space. It'll take 6M years to cross, but between smiting its creators and now, it has ten times that long - plenty of opportunity to see the sights, share pictures with friend-clones, and grow bored. At which point it may toy with self-competition and become a form of life, or take up gardening and make some.
Reaching Andromeda (if it had started soonish) would require about 3% c on average to arrive by the present day.
Edit, integrating comments on other paths of evolution:
If the AI instancaes diverge but with a common goal, then small areas will become test-beds for other designs, giving a rapidly-evolving version of this effect on a local scale.
If the machines are all sub-AI and have been left uncontrolled because someone made an error in calculating the impact velocity of a direct-delivery asteroid impact, then adaptation can proceed unencumbered by checksums, and may be driven by an optimisation-gone-unchecked.
If the AI is self-upgrading, then "evolution" is a moot point - the principles of intelligent design will apply, though that can include some random experimentation to generate ideas or tune settings. This will mean that the AI may not seek to fill all niches, but may instead dedicate its resources to the most useful- or interesting-looking ones.
Notably, some of these paths result in Earth being left alone, which may be useful to your story.
First, let's define "the universe, as seen from present day Earth." This question suggests that Eta Carinae is the farthest star system visible to the naked eye from Earth. It's located 7,500 light years away. Let's imagine an alien species that's capable of flight at half lightspeed. To be able to cover everything within 7,500 lightyears of Earth, they could multiply new VonNeumann spacecraft and get to every star system in tens of thousands of years and populate the observable (to the naked eye) universe. I'm being vague because, in terms of the age of the universe, that's the blink of an eye. So the question is if they can develop the technology between the creation of their species and circa 50,000 BC. If you have a species that's, let's say, a billion years old, they could have created the necessary technology with time to spare.
I've asked a question about what's the oldest civilization of precursors can appear, got the answer of several billion years.
Conservative estimates for coverage of our galaxy with von-Neumann probes ballpark somewhere around half a million to million years, so this leaves plenty of time for evolution to take place in the feral probes to develop ecological niches and whatnot.
If we just stick to STL means of propulsion, this means hundreds to thousand years between voyages - and between reproduction cycles presumably, so evolution might be glacial compared to planetary biospheres, but this can be freely adjusted as needed for the plot via the fact that artificial life might evolve quite significantly faster than traditional DNA-based evolution, and you can basically choose any speed that fits your story.
The earth spent 1 billion years doing basic nothing, but photosynthesis so it could bond to iron in the water. A planet only 10% smaller would have 100 million year jump on us. The planet could have had extra oxygen, or oxygen rich asteroids, meteors, and etc could have impacted planet dramatically accelerating the process. Either that or other materials that when combined could form oxygen could have speed up the process.
Most of human advancements have happened in last 2000 years or so, so any race with even 100,000 year head start could totally do it. Even 10,000 years would be a huge advantage.
We basically have the technology today to have self replicating ship already.
3D printers exists, and if you have enough money you can even have one that does metals. 3d printers that do plastic are already abundant and you can have one for a couple hundred dollars plus operating expenses.
So as long as the ship can ingest rocks, separate, and refine those rocks into their base components 3d printers can print virtually any replacement parts. Obviously you will have to have a factory area to turn raw materials into whatever the 3d printers need.
They will have to have some kind of fabrication plant for chips like CPUs, but it shouldn't be a problem.
As long as each ship maintains an inventory of spare parts this should be a non-issue.
Technically, if someone had the billions of dollars to spend we could have one today.
As long as the AI keeps learning and improving itself each new generation of ship should be significantly better than the last. Eventually it should reach Star Trek levels of advancement.