I wear a casquette all the time (yes, under my helmet... don't start) and I can say absolutely it keeps the rain off. I wear contacts, but when it's raining or cloudy, I switch the lenses in my Oakleys to the clear ones... so I know the struggle. (Side note, IMO you should always have something over your eyes. Bug in the eye at cruising speed ain't no joke.) Flip the brim down, and it rests right above your glasses and you should be golden.
There's nothing a casquette can't do.