The Spanish Fed has not confirmed their criteria for deciding the World team. It could be Euros. During Nationals, the commentator said he thought it would be a combination of the scores from Euros and Nationals. Nationals scores were very close so either way, the results at Europeans will probably be the determining factor.
According to Hieloespanol (https://twitter.com/Hieloespanol/status/1083318099816914944), which is one of the main Spanish sources of figure skating news (it publishes more info than the proper FEDHIELO, i.e. Spanish Federation of Ice Sports), the ice dance team who will represent Spain at Worlds will be announced after the Europeans, following a technical decision of the Figure Skating Committee and the appointment made by the President of FEDHIELO. Below the original post in Spanish:
Según ha podido saber @Hieloespanol la pareja de danza convocada para el mundial será anunciada después del europeo, tras decisión técnica del Comité de Patinaje y designación por parte del Presidente de la @fedhielo.