It's the temperature gradient across the thickness of the glass which actually causes the bulb to shatter. In other words, if surface of the glass inside the bulb is, for argument's sake, 500°F and the surface of the outside is at tap water temperature (70°F this time of year in my area) then there's a 430°F temperature difference across maybe 0.03 inches thickness of glass. That's a temperature gradient of about 14,300°F per inch. Note that if the glass were thicker, say 0.1", then the temperature gradient would be higher. What causes the glass to shatter obviously is that it expands on the inside and contracts on the outside. When these forces exceed the tensile strength of the glass you know the result. It is for this reason that thin glass can deal with temperature shocks better than thick glass.
As for the answer to your question I think it would still shatter. When the bulb is operating in air, which is a very poor conductor of heat, the outer surface of the bulb is cooler than the inside surface, but still very hot. Therefore the temperature gradient is fairly small. If you put the same bulb in water then for all intents and purposes the outer surface of the bulb will be at the same temperature as the water but the inner surface will still be nearly as hot as when the bulb is running in air because glass can't conduct heat fast enough from the inside to the outside (i.e. it's a poor thermal conductor). The end result will be nearly the same as simply immersing a warm bulb running in air in water.