I can help with getting a student visa ( for North Americans). It does cost 2000 euros but you get a 4 week TEFL course and certificate (if you pass) with the ability to earn around 15 euros an hour teaching English at a max of 20 hours a week. The TEFL course lasts 4 weeks. You also get 4 weeks of Spanish language classes ( 4 hours a day). The student visa is good for 12 months so you can stay in Spain for that peroid.
Spain has an excellent gov`t run program for learning languages at an institution country wide called, The Official School of Languages ( Escuela Oficial de Idiomas). For more information see http://www.eoidiomas.com/web/index.asp , You can learn just about any language there, Arabic to Zulu. I have a NIE, a Foreigner Identification Card, which allowed me to take classes for 90 euros a semester, so it is basically free. For Spanish they have up to 5 levels each 2 semesters long. I am not sure if the student visa will allow you to enroll but I imagine it would. Foreigners on a tourist visa cannot attend.
For information about getting the student visa for 12 months with TEFL Certification and 4 weeks of Spanish classes you can contact me at .(JavaScript must be enabled to view this email address).
If you are not interested in teaching English but just want Spanish Classes with a student visa ( shorter than 12 months) , I can point you in the right direction.
Best of luck!