I believe I have read about one case in which a British hospital ship (the Newfoundland) was attacked and sunk by German aircraft in 1943.
Here is an article which briefly mentions it - maybe someone else can find a more detailed one:
http://www.spokesmanreview.com/news/...Date=2/21/2005
As was mentioned earlier, the Japanese hospital ship Awa Maru was sunk in the Pacific as well.
Speaking of the Titanic, in WW1, her sister ship Britannic was sunk while serving as a hospital ship - the sinking has never been proven to have been a sub attack though and may have been caused by a mine. Hospital ships back then had yellow funnels, which looks better than white to me.
http://members.aol.com/WakkoW5/britannic.html
http://website.lineone.net/~britannic98/