A brilliant idea worthy of esteem! Now here is a question, do you really really want to get a taste of how it would be to live in Spain and in essence "live like a local"... if that is the case I'd recommend:
Location - Base yourself in only one major city, this will give you the most time acclimate and absorb the culture, if you begin to stay in multiple big cities then it starts to look like you are on vacation. However, you can escape the city with multi-day side trips, for example from Barcelona, rent a car and spend a few nights in the mountain villages of Ribes de Freser or Queralbs, hiking in the Pyrenees, this is a very local thing to do.
Ground yourselves - Tie yourselves to your adoptive home city, volunteer/teach/ take classes etc., do something that resembles a bit of a job so you can experience a taste of the daily life in Spain. Staying in an Apartment or Air BnB will be fundamental in grounding yourselves to your adoptive city
Language - This will be your best way of living like a local, but really put effort into it, try to maintain entire conversations with people, not just switch back to English because it will be easier. Also know that Spain is a multi-cultural multi-lingual nation, other than Castellano (Spanish), learn a few words in the regional language of the city you will be staying, like Catala for Barcelona, or Euskara in Bilbao for example.
Food - don't go out to dinner every day, this is not the Spanish way, don't be a tourist! Learn about our dinning hours and adhere to it as best as you can, it will come naturally if you give it time. Light breakfast ( 7 - 9 am) of a Cortado with a pastry. Lunch (2 -4 pm) is main meal of the day eat the Menu del Dia at the local bar restaurant. For dinner (9- 11 pm) eat something light at home that you make yourselves like pan con tomate. Try to go out to shop for groceries in the market every day, but don;t try to fill your fridge on the first trip.
Tourist sights - resist the urge to "go see the sights", this is the worst thing you can do if you really want to live like a local, try to stay away from tourist spots - Barri Gotic is off limits lol! Look at local media for local happenings and events you can attend, local concerts are great. This is a good resource for Barcelona/Catalonia - https://www.timeout.com/barcelona
Well that is my initial thoughts and tips on how to get a taste of living like a local in Spain, it's going to take discipline not to fall into the tourist mode, remember you are not going to Spain as a tourist but as a local, don't expect to see the sights ;-)