The only place I was able to get free wi-fi was in Kumamoto. Otherwise, I had to pay for it in different hotels in Sasebo, Nagasaki, Fukuoka and Tokyo.
I don't know about Shinkansen but you can check w ww.freespot.co m for free WLAN hotspots in Japan. Quite a lot of restaurants or coffee shops offer this service in Hiroshima, so if you're in the city center you should have little problems finding a hotspot. They usually appear under the SSID "FREESPOT".