The point is the EU doesn't want to favor independence in Spain or elsewhere, and Spain doesn't want a referendum, so do you really think they will promote Scotland's independence? That would promote similar referendums everywhere. The EU doesn't want that kind of popular-driven initiatives. It is better for the EU to make sure Scotland never joins the EU so that anyone else understands that voting for independence risks making them leave the EU.
That's bullocks, Slovenia (got independence from Yugoslavia in 1991) and other countries wouldn't be part of the EU if that was the case.
Spain dosn't need to promote Scotland independence, neither does have the EU. But if Scotland DOES become independent is not a matter anymore for Spain or the EU, since they aren't a EU state member, they would need to go through the same process many other countries had to do in the past, countries that also became independent.
The problem was always what would happen if a declaration on independence happens on an EU state member. That's the problem for the EU, and that was the argument Spain is giving to these locations that wants independence.
"If you leave Spain, you are out of the EU, you'll have to start again if you want to become a full member of the EU"
That argument and that fear is out of the equation now, UK and by proxy, Scotland, are out of the EU, Scotland voting for independence won't put them out of the EU, they already are!. The argument sustains if in the future Scotland becomes part of the EU, because they would have done the process the EU said countries declaring indepence should have.
And let me tell you one thing, if EU wants they can easily make Spain vote YES to make Scotland part of the EU.