If you're going so far back, Italy and Greece should definitely be there. 
In terms of modern world shaping, I think two world wars (in a negative way) and all those inventions/industrialisation in the 19th century puts Germany before Spain. 

But I would rather argue for Russia or an Asian country in the top 4 (China or Japan probably, but idk enough about Asian world history. I mean they invented many things earlier, we just didn't know it in the west)