With respect to pickled herring, is the herring cooked before being put into the pickling solution?
If not, what safety measures are in place to ensure bacteria are within safe limits?
No, it is not.
Traditionally it is first cured with salt to reduce the water content of the meat, then placed in a vinegar-based brine.
Recipes vary a bit, but for classic Bismarckhering 14% salt and 7% acetic acid are used. Additionally, today pickeled fish is stored in refrigerators (as opposed to the 19th century), providing additional safety.
This is sufficient to stop the growth of harmful microorganisms, including the feared clostridium botulinum.