Brazil-born Atletico Madrid striker Costa has battled an ongoing hamstring problem that limited him to just nine minutes in the Champions League final defeat to city rivals Real, a week after he was forced off 15 minutes into his side's La Liga title decider with Barcelona.
And he did not feature in the reigning World Cup champions' 2-0 win over Bolivia in Seville on Friday.
But his goal-scoring prowess – Costa was the third highest goal scorer in La Liga last season with 27 – convinced Del Bosque to take a calculated risk, backed up the presence of Chelsea hitman Torres, 30, and Costa's Atletico teammate Villa, 32.
Del Bosque also left strikers Jesus Navas, Alvaro Negredo and Fernando Llorente, midfielder Ander Iturraspe, and defenders Alberto Moreno and Dani Carvajal out of his squad, the six having been named in his initial 30-man list, along with Thiago Alcantara, earlier ruled out with a knee injury.
Manchester City winger Navas has been sidelined with an ankle injury since mid-April and failed to find the favour Del Bosque granted Costa.
But it was heartbreak for Llorente, world champion in 2010 and European champion in 2012, after scoring 16 goals in his debut season for Juventus in Serie A, and Manchester City's Negredo, who has seemingly paid for his lack of game time with the English champions.
Carvajal, who last Saturday was celebrating winning the Champions League with Real Madrid, took his omission phlegmatically.
"It is a shame not to be in the final squad but in spite of that I am very proud to have been so close," said the 22-year-old.
Spain face Chile, the Netherlands and Australia in World Cup Group B. Their first match pits them on June 13 against the Netherlands — their opponents in their 2010 World Cup final triumph.
Goalkeepers: Iker Casillas (Real Madrid), Jose Manuel Reina (Napoli/ITA), David De Gea (Manchester United/ENG)
Defenders: Sergio Ramos (Barcelona), Gerard Pique (Barcelona), Jordi Alba (Barcelona), Javi Martinez (Bayern Munich/GER), Cesar Azpilicueta
(Chelsea/ENG), Raul Albiol (Napoli/ITA), Juanfran Torres (Atletico Madrid)
Midfielders: Xavi Hernandez (Barcelona), Sergio Busquets (Barcelona), Andres Iniesta (Barcelona), Cesc Fabregas (Barcelona), Xabi Alonso (Real Madrid), David Silva (Manchester City/ENG), Koke Resurreccion (Atletico Madrid), Santiago Cazorla (Arsenal/ENG), Juan Mata (Manchester United/ENG)
Forwards: Pedro Rodriguez (Barcelona), Diego Costa (Atletico Madrid), David Villa (Atletico Madrid), Fernando Torres (Chelsea/ENG)