This is actually quite a sticky subject, as you might know Spain is administered through "Autonomías", territorial regions with quite a hefty amount of autonomy regarding most legal matters; fauna, flora, nature, conservation and the like, are therefore under local control, and so no general law applies. That being said, most laws, for most regions, are similar in their structure, limits and sanctions.
Legally, that is, on paper and according to an actual passed law, photography of animals is not permited in certain cases. I have been looking up, randomly, the Madrid law and the Castilla y Leon law, and both limit photograpy of endangered species, or likely to be endangered. Here is a quote from the Madrid law
3. Asimismo queda prohibida, salvo expresa autorización de la Agencia de Medio Ambiente, la observación y la caza fotográfica de especies catalogadas como en peligro de extinción o sensibles a la alteración de su hábitat, y el establecimiento a tales fines de puestos fijos a menos de doscientos cincuenta metros de sus puntos de cría, lugares de concentración migratoria o invernada.
A quick translation: Prohibition, unless a permit is given by the competent authority, of observing or photographing species catalogued as in danger of extinction or senstivie to habitat modification, therefore no material or hides may be set up closer than 250 metres from their breeding grounds, wintering areas or migratory concentration areas... sorry for the poor quality, it's a bit of an ad hoc translation)
Thats the theory, and along with it is another problem, as you might also know large areas of central and south Spain are privately owned and sealed off, huges estates, or "fincas", and legislation concerning photographing the property or "things on or over it" is shady. Some will not give a damn, while others may tell you that you have no right to be taking pictures of their land, even if you are outside the property and on the road...
However, with all this, and all the legal technicalities, in my own personal experience, and baed on the photographing outings of many birders and nature lovers I know, you will, 99% of times, have absolutley no problems, at all. Most birders, as long as they are not under the spell of some extreme twitching, have enough sense and love for the subjects they are trying to capture, that they know how to behave, and that behaviour usually keeps one safe and on the legal side. As long as one keeps to the paths, does not bother the birds, and makes sure, before setting up the gear, or the tent, or what have you, that the area is not a national park or protected area, chances are nobody will mind and nobody will tell you off (or fine you)
Here, as an example, is the Madrid law
http://www.madrid.org/wleg/servlet/Servidor?opcion=VerHtml&nmnorma=384&cdestado=P
Hope all of this heleped
Oh, out of curiosity, what region, or area, are you planning to visit?