The submission of the advance return for VAT in Spain, which is always accompanied by further documentation obligations, is of course only necessary if one also has a Spanish VAT ID. Usually, these are sellers who either sell from or to Spain, but for sellers who sell to Spain, there is a kind of tax free amount: the VAT registration threshold.
These thresholds exist in all EU countries and as long as you export to a country within a calendar year below this threshold, no registration is required.
The delivery threshold in Spain is 35.000,- EUR. So online traders from other EU countries only need to register in Spain if they sell goods with a value of more than 35.000,- EUR to Spain within one calendar year.