Rolls Royce experimented with a lot of engines. There was one which was 21 liters and was called the Kestrel. They also experimented with two Kestel blocks bolted together in an "X" configuration which gave a capacity of 42 liters.
The Merlin was supposed to be a stopgap engine while they tried to sort out engines such as the "X" configuration and Griffon. However once they got started on the Merlin it was so good that they scrapped the "X" configuration and went with the Merlin and continued to develop the Griffon at a slower pace until it was ready in about 1942. By this stage the Merlins in the Spitfires were going about as hard as they could reliably go and the decision was made to change the Spitfires over to the Griffon. The Merlin continued to be used in Hurricanes, Mosquito's, P51's and Lancaster bombers.
The reliability of the Merlin was apparently one of its biggest assetts. Rolls Royce continually tested the Merlins to destruction. They would get an engine off the production line and set it up on their engine test bed, put the appropriate propeller on it and then start the engine and run it to maximum revs (3000 rpm) and run it non stop until it failed. Once it failed they would pull the engine down and work out why it failed. Each time they would redesign the part that failed and put that new part into the engines on the production line, when the upgraded engine came off the production line they would repeat the process again. This continued and continued and continued until the engine was almost indestructable apart from enemy fire. The story goes that the Lancaster bombers could fly all the way from England to Berlin or any other German city (at maximum revs) and back again and not lose an engine to anything other than enemy fire.