Living Will is called ´Declaración de Voluntad Vital Anticipada´ in Spain.
You have to register them with the relevant public authorities in your region for them to be valid and you can include all kinds of medical decisions that need to be made when you are not capable to do so yourself.
For Andalucia, a guide in English on how to draw up the declaration:
General info for Andalucia and access to the menu where to make an appointment:
Note: the telephone number for Salud Responde is 955 45 50 60 (member’s experience February 2020)
We will be adding more regional registers as we come across them.