Hi, I hope I can offer a bit of useful advice as I lived in Spain for 5 years- from the UK originally and now living in France. The process will be a bit more complicated now bc of Brexit but some companies do offer programs of work for people specifically in your position. I would emphasise that you're in-between graduating and possibly applying for a masters, that way they would be aware of only hiring you on a yearly contract.
I should let you know that salaries in Spain are very low, so please don't expect the salary you'd get in England for example and, it would be even lower if it was a short contract, after graduating and helping with your visa. Getting the visa isn't incredibly difficult but you have to be patient and it helps a lot if you speak Spanish as a lot of people in administrative/government roles don't.
I would look into applying for a visa now because it is a lot of paperwork you need to prepare!
- if you have anymore questions about this, or Spain in general ask me and I'll help you as best as I can
ps the visa you'd probably want is 'professional work' it lasts one year and then if you chose to stay you could get a permanent one.