You're asking a question, the answers to which involve some complexities. No simple answer. Probably in the end no one here can tell you (yes or no) whether you can do this "within reasonable time and cost."
First, the meaning of what is a reasonable time and cost to you hasn't been defined.
Here are some tools that will hopefully enable you to answer at least some of your questions.
The cost and time of train travel in Europe:
The best train schedule is this oneuser friendly for travel timesNotice that a train from Rome to Madrid takes about 24 hours or more, one way.
The above site doesn't give you cost because it's outside of Germany.
Here's an Italy train site that will give you costsclick here
Your being locked into leaving from Italy and returning to Italy does have the effect of complicating the time and cost requirements.
Another question is whether the 2 months includes choir time or is the entire 2 months after your choir duties are over.
Here are schedules for Spain railhttp://www.renfe.com/index.html
Hope this helps.