Luis Enrique's men head into Qatar off the back of a solid performance at the UEFA Nations League, where they clinched top spot in Group A2 after claiming 11 points from six matches.
Costa Rica, who saw off New Zealand 1-0 in June's qualifying playoff, are underdogs to make it through Group J which also includes Japan and 2014 world champions Germany.
Here, Sports Mole looks at how the squads of Spain and Costa Rica stack up against each other ahead of Wednesday's contest.
SPAIN
Most valuable player:
Pedri (£86.6m)
Overall squad value:
£760.0m
Most capped player:
Sergio Busquets (139)
Leading goalscorer:
Alvaro Morata (27)
Total caps:
733
Total goals:
79
Oldest player:
Sergio Busquets (34)
Youngest player:
Gavi (18)
Average age:
25.3
SQUAD IN FULL
Goalkeepers: Unai Simon (Athletic Bilbao), Robert Sanchez (Brighton), David Raya (Brentford)
Defenders: Cesar Azpilicueta (Chelsea), Dani Carvajal (Real Madrid), Eric Garcia (Barcelona), Hugo Guillamon (Valencia), Pau Torres (Villarreal), Aymeric Laporte (Manchester City), Jordi Alba (Barcelona), Jose Gaya (Valencia)
Midfielders: Sergio Busquets (Barcelona), Rodri (Manchester City), Gavi (Barcelona), Carlos Soler (Paris St-Germain), Marcos Llorente (Atletico Madrid), Pedri Gonzalez (Barcelona), Koke (Atletico Madrid)
Forwards: Ferran Torres (Barcelona), Nico Williams (Athletic Bilbao), Yeremi Pino (Villarreal), Alvaro Morata (Atletico Madrid), Marco Asensio (Real Madrid), Pablo Sarabia (Paris St Germain), Dani Olmo (RB Leipzig), Ansu Fati (Barcelona)
COSTA RICA
Most valuable player:
Keylor Navas (£4.3m)
Overall squad value:
£16.2m
Most capped player:
Celso Borges (155)
Leading goalscorer:
Bryan Ruiz (29)
Total caps:
1,153
Total goals:
127
Oldest player:
Bryan Ruiz (37)
Youngest player:
Jewison Bennette (18)
Average age:
27.1
SQUAD IN FULL
Goalkeepers: Keylor Navas (Paris Saint-Germain), Esteban Alvarado (Herediano), Patrick Sequeira (Lugo)
Defenders: Juan Pablo Vargas (Millonarios), Keysher Fuller (Herediano), Oscar Duarte (Al-Wehda), Bryan Oviedo (Real Salt Lake), Carlos Martinez (San Carlos), Francisco Calvo (Konyaspor), Kendall Waston (Saprissa), Ronald Matarrita (FC Cincinnati)
Midfielders: Daniel Chacon (Colorado Rapids 2), Celso Borges (Alajuelense), Jewison Bennette (Sunderland), Bryan Ruiz (Alajuelense), Gerson Torres (Herediano), Youstin Salas (Saprissa), Yeltsin Tejeda (Herediano), Brandon Aguilera (Nottingham Forest), Roan Wilson (Municipal Grecia), Douglas Lopez (Herediano), Anthony Hernandez (Puntarenas), Alvaro Zamora (Saprissa)
Forwards: Anthony Contreras (Herediano), Johan Venegas (Alajuelense), Joel Campbell (Leon)
Read more on Spain vs Costa Rica
Click here to read our full preview for Spain vs Costa Rica
How Spain could line up against Costa Rica
How Costa Rica could line up against Spain
World Cup 2022: Reasons for Spain to be confident of beating Costa Rica