Hi & Welcome
Sorry, I am confused. I presume from your profile you are canadian but you say you have a Spanish passport. Therefore you have Spanish citizenship? If so you wouldn't have an NIE but a NIF (me thinks). NIE's don't expire, they are with you for life. You say yours expired 2 years ago but a year ago you went autonomo?
If you have been doing IRPF deductions I am surprised nobody has caught up with you, I did a reclaim of tax once but it got held up because one client had not paid the IRPF... if you are doing IRPF then somewhere you have a tax record of these going on and if you have not been filing the quarterly returns for income tax, IRPF and IVA then they will want to know why and there may be fines etc.
If your Spanish is not good then I would find a good Gestor or Assesoria and get them to go to hacienda and get your files and sort it all out. I would't play the "i have been away" if you have been raising sales invoices and deducting IRPF from them as this won't wash... explain you got confused to your Gestor and get their advice and get them to fix it, but either way your going to have to get a return made up for all taxes, IVA etc and settle it up I am affraid!