The Atletico Madrid striker has been suffering with a series of muscle problems and limped out of last Saturday's Champions League final against Real Madrid early in the first half. (Agencies)
Spain have one more warm-up game, against El Salvador in Washington DC on June 7, before the tournament in Brazil when Del Bosque can test Costa's fitness.
If he does not recover sufficiently, Spain can replace him in the squad up to 24 hours before their opening Group B match against Netherlands on June 13 as long as they can prove his injury is serious enough to prevent his participation.
As well as Costa, Del Bosque included fellow forwards Fernando Torres of Chelsea, who netted a penalty in Friday's 2-0 friendly win against Bolivia in Seville, and David Villa, Spain's record scorer.
There was no place for winger Jesus Navas, who missed the final part of the Premier League season with an ankle injury, or his Manchester City team mate Alvaro Negredo.
Real Madrid fullback Dani Carvajal was also left out, with Del Bosque preferring the more experienced Juanfran of Real's city rivals Atletico.
Chile and Australia make up Group B and Spain's first game is against Netherlands on June 13, a repeat of the 2010 final which Spain won 1-0 after extra time.
Del Bosque announced his final squad on the Spanish soccer federation's website on Saturday.
Goalkeepers: Iker Casillas (Real Madrid), Pepe Reina (Napoli), David De Gea (Manchester United)
Defenders: Sergio Ramos (Real Madrid), Gerard Pique (Barcelona), Raul Albiol (Napoli), Cesar Azpilicueta (Chelsea), Juanfran (Atletico Madrid), Jordi Alba (Barcelona)
Midfielders: Xavi (Barcelona), Xabi Alonso (Real Madrid), Sergio Busquets (Barcelona), Andres Iniesta (Barcelona), Cesc Fabregas (Barcelona), Santi Cazorla (Arsenal), Koke (Atletico Madrid), Javi Martinez (Bayern Munich)
Forwards: David Silva (Manchester City), Diego Costa (Atletico Madrid), Fernando Torres (Chelsea), Pedro (Barcelona), Juan Mata (Manchester United), David Villa (Atletico Madrid)
The Atletico Madrid striker has been suffering with a series of muscle problems and limped out of last Saturday's Champions League final against Real Madrid early in the first half.