Yes, they're legal to use in Spain, although you might have a problem if you upload footage to YouTube or Facebook without blanking-out numberplates or anything else that could identify an individual person or vehicle.
Where there's any doubt about what happened in an accident or who is to blame then having dash cam footage available is always a good thing. It might not be admissible as evidence in terms of prosecuting a 3rd party, but it's always good to be able to produce as verification about what actually happened and save your no claims bonus.
Dash cams and sat navs need to be positioned so that they don't obstruct the drivers vision of the road and shouldn't be touched by the driver whilst the vehicle is moving. If your dash cam has a screen then it shouldn't be on while the vehicle is moving so as not to distract the driver.
I personaally use a Mobius action cam with a wide angle lens (Lens C).
https://www.joovuu.com/gb/action-cameras/61-mobius-action-camera-wide-angle-lens.htmlThis doesn't have a monitor, so you need to take the micro SD card out and view the footage on a laptop or tablet (or pop it in your Android phone if it has a micro SD card slot), but it's very small and easy to mount.
You need to use a decent quality memory card (I always use a 32gb Sandisk).
The Mobius produces great quality footage at night. Avoid cameras with infra red LEDs to provide night vision. The infra red light reflects off the inside of the windscreen and produces flare and even if that didn't happen the IR light doesn't shine far enough to clearly illuminate anything beyond the end of the bonnet. Much better to go for a camera that has good low light performance, like the Mobius or similar.
Pete.