Yes, horse can still race in the rain as long there is no thundering, the thunder will be distracting for the horses.
They can race in the rain, they usually don't like to do it, because the ground becomes slippery and it becomes dangerous for the horses and riders.