Vicente del Bosque's side beat the Netherlands 1-0 after extra time in Johannesburg three years ago to win football's greatest honour for the first time.
And they were paired with the Netherlands in Group B at Friday's draw, to be joined by Chile and Australia, who are currently the lowest-ranked team in next year's showpiece.
Hosts and five-time winners Brazil will open the tournament against Croatia in Sao Paulo on June 12, with Mexico and Cameroon joining them in Group A.
Germany – who finished third in South Africa in 2010 – will take on Portugal, Ghana and the United States in Group G. USA manager Jurgen Klinsmann formerly coached and played for Germany.
France's reward for a dramatic comeback in their play-off against Ukraine – they came from 2-0 down to win 3-2 over two legs – is a favourable draw alongside Switzerland, Ecuador and Honduras in Group E.
Argentina, who have won the title twice, face Bosnia-Herzegovina, Iran and Nigeria in Group F while England will take on Uruguay, Italy and Costa Rica in Group D.
Belgium were paired with Algeria, Russia and South Korea in Group H, while Colombia, Greece, Ivory Coast and Japan will do battle in Group C.
The 2014 World Cup draw:
Group A: Brazil, Croatia, Mexico, Cameroon
Group B: Spain, Netherlands, Chile, Australia
Group C: Colombia, Greece, Ivory Coast, Japan
Group D: Uruguay, Costa Rica, England, Italy
Group E: Switzerland, Ecuador, France, Honduras
Group F: Argentina, Bosnia-Herzegovina, Iran, Nigeria
Group G: Germany, Portugal, Ghana, USA
Group H: Belgium, Algeria, Russia, South Korea
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.