Costa has pulled out for "family reasons" and will be replaced by Celta Vigo striker Iago Aspas, who had been a surprise omission from Luis Enrique's first selection as manager.
Aspas scored for Celta in a 2-0 win over Atletico on Saturday and will now compete with Chelsea's Alvaro Morata and Rodrigo Moreno of Valencia up front.
Spain play England at Wembley in the UEFA Nations League on Saturday before hosting Croatia in Elche three days later.
September 3, 2018
Spain are currently ranked 9th in the world after a disappointing World Cup in Russia.