Why does the Trent XWB have intermediate compressor stages?
Jet engine designers have to find compromises all the time, and the one that counts here is between lower complexity and higher efficiency.

In the 1960s, Rolls-Royce fell behind in large commercial jet engines as competitors introduced large bypass ratio fans such as the GE CF6 and the P&amp;W JT9D, which powered the new generation of wide body jets being introduced at that time. All efforts on the British side came to nought, partially for lack of funding (source: Wikipedia):


  The company [Rolls-Royce] went ahead with the project and under the
  leadership of (Adrian) Lombard built the twin spool demonstrator.
  Overall development costs of the RB.178 was £2.6 million. As a
  comparison, the G.E. and P&amp;W companies were awarded nearly $20 million
  by the U.S. DoD ( Department of Defense) to develop and build the TF39
  and STF200 technology demonstrators.


or for the preference of US aircraft manufacturers for US engines. Wikipedia again:


  There are perhaps many reasons why the RB.178 failed to take off and
  chief among them was the refusal of Boeing to accept the Rolls-Royce
  engine on the transatlantic 747.


Rolls-Royce realised that they had no chance to catch up by designing yet another two-spool fan and risked the company on a three-spool design, which would later become the RB 211. Wikipedia again:


  Meanwhile, Rolls-Royce was also working on a series of triple-spool
  designs as replacements for the Conway, which promised to deliver
  higher efficiencies. In this configuration, three groups of turbines
  spin three separate concentric shafts to power three sections of the
  compressor area running at different speeds. In addition to allowing
  each stage of the compressor to run at its optimal speed, the
  triple-spool design is also more compact and rigid, although more
  complex to build and maintain.


The advantages of using three spools is that the speed of each stage can be more finely optimized, so each stage operates at a higher efficiency. Another promised advantage was the use of carbon fiber for the first stage fan, which allowed considerable weight savings and offered Lockheed a distinct advantage in its L-1011 TriStar over the very similar Douglas DC-10.

However, the carbon fiber fan failed the bird strike test and the engine did not meet its development targets. In the end, Rolls-Royce had to be taken over by the British government and the TriStar entered the market with a one-year delay. But the RB211 went into production, albeit with a delay. The gamble did not pay off commercially, but technically it placed Rolls-Royce instantly ahead of its competitors. When a higher-performance version of the RB211 was added as an engine option to the Boeing 747, the direct comparison with the two-spool designs made the efficiency gains of the three-spool design obvious. FlightGlobal reported in 1980:


  The importance placed on fuel saving by airlines is emphasised by
  Qantas' adoption of RB.211-524 power for its new Boeing 747s - the
  only aircraft on which all big three fans are available. Qantas found
  that British Airways' Boeing 747s fitted with RB.211s burnt roughly 7
  per cent less fuel than its JT9D-equipped fleet, a saving of about $1
  million a year at today's prices.


The second oil crisis in 1979-1980 made those efficiency gains very relevant to the airline industry. But the three-spool design offers another advantage: By tailoring the number of stages and their diameter to the desired performance, the same basic design allowed Rolls-Royce to cover a much wider thrust spectrum with one basic engine design. The RR Trent is a direct development of the RB211 and covers a thrust range from 240 to 430 kN without compromising on efficiency. This enables Rolls-Royce to adapt the engine optimally to stretched or shortened versions of most airliners, so it is in an ideal position to offer the most efficient engine for the job. In fact, the successful development of a three-spool fan engine in combination with a better business model helped Rolls-Royce to gain an overall market share of 40%. Wikipedia again:


  Sales of the Trent family of engines have made Rolls-Royce the second
  biggest supplier of large civil turbofans after General Electric,
  relegating rival Pratt &amp; Whitney to third position.


That is the reason for the intermediate compressor on the A350: It helps to give it the most efficient engine for the lowest development cost and risk. And yes, the fan is all what is left of the low pressure compressor stage on the Trent 1000. This way it can be run at a lower speed while the intermediate compressor can be built smaller since it runs at a higher speed.