It looks like you'll have about 3 weeks for the trip (if I'm counting days correctly), so it looks like you're not trying to squeeze in way too much. The only issue I see is that a train/boat from Italy to Barcelona would take a really long time. I've never done it, but I know Switzerland to Barcelona is usually an overnighter. Madrid's maybe another 4 hours from Barcelona too by train.
I haven't been to Austria, but I have been to Switzerland and hear that the alps are much nicer in Switzerland.
As far as the Eurail goes, each day you can travel as much as you want by train and it only uses one day on your eurail pass. You can use an entire day for only a 3 hour train trip, but if you need to you, have the full day to travel. As far as I know, the rail pass is valid for most trains in whatever countries you get it for (some passes allow 3,4, or 5 adjacent countries while others include over 20 countries), but I think they send you a booklet that explains some trains that aren't covered, but you still may get discounts. For example, once I got to Switzerland, I had to take another train, bus, and gondola up to my hostel. These were not fully covered by the eurail pass, but I did get a discount. Also keep in mind, that some of the high speed trains require you to pay for a reservation that the eurail pass doesn't cover. This can usually range from 3-10 euros (maybe more, but I never spent more than 10 on a reservation).
Rick Steves gives a lot of good advice about rail passes here:
But we recommend you buy your pass through Tpunk! http://www.travelpunk.com/blog/eurail-passes/
Good luck, things work out in the end, and it's really not that tough once you find the right resources!