Madeline, I’m afraid to say it does sound like normal practise from the Spanish taxman. They don’t offset other costs against the 3% retention. As far as I am aware you either pay all your taxes and they return it in full, or they keep it all.
People who are all square with the taxman do get paid back the 3% in the end, but it can take an outrageous amount of time. There are quite a few threads on this question, which you can see here: 3% retention / withholding tax. Read through them to see how long others have had to wait.