The iPad charger will work on any voltages in any country in the world. All you'll need is the usual travel adaptor to connect to the Spanish outlet - the charger itself will work fine.
As the previous poster suggested, if you want to use 3G in Spain then it's better to purchase a local pre-paid microSIM when you arrive to avoid the roaming charges that you'll encounter otherwise.
Spain has WiFi hotspots all over the country - most malls, retail outlets, hotels, airports, some public transport, coffee shops, restaurants - so you'll probably find no problem in remaining connected.
I hope you have a great time there.
Tim