I had a somewhat similar case; but I have a distinct advantage since my wife and I have a child.
I'm Italian and my wife's Brazilian, we lived in Brazil and my son was born in Brazil but I registered his citizenship in the consulate, so he's Italian.
Years ago, we moved to Italy and she had to get a
visa residency permit (which we only requested once we were already there) - when my wife asked how long it would take and if there was a change that it would be rejected, the man at the foreigner's office actually said something like "doesn't take too long but don't worry, it will be approved and even if it's rejected, we couldn't really do anything about it as you're the mother of an Italian citizen".
We later (2016) moved to Germany and the same was NOT said there; she had to apply for the German residency
visa residency permit (new one, as if the Italian visa residency permit didn't exist) and even though they were very friendly and mentioned there would not be a problem, the process was not guaranteed like it was in Italy and they asked for a bunch more information like things from my job, etc...
That's just my story, now to more directly answer your question:
1. Both of you must register residency in Spain
2. Your Italian Spouse must register in the Italian consulate of the Spanish region - this will automatically un-register their residency in Italy (will be registered in the AIRE)
3. You need to apply for a new visa in Spain
If your Italian spouse is working in Spain, your Visa application should go smoothly; otherwise it may still be approved but I guess it'd be less likely.