Basically, in order to fly a drone in Spain you need to register both as a pilot and as an operator and be certified as a pilot on the appropriate category, both free of charge in the basic categories. However, once you have passed your exam, its validity should be EU wide. For instance, I have flown my
Mini 2 in the Netherlands without any local exams or additional paperwork, just being aware of the country rules.
For pilot basic categories,
A1 and
A3 Open Sub Category, you will just need to pass an online exam. Higher categories, allowing heavier drones and other areas of use will need different exams, including in person and with a medical certificate.
And, yes, the drone and the remote controller must have pilot and drone identification data in form of plates - but they even fit my
Mini 2, so forget about car-size plates
You can fly further information, in English, in the website of AESA (Spanish government body kind of similar to FAA in USA):
www.seguridadaerea.gob.es