Using python to change the settings of all subdivision surface modifiers
Use the old one if it exists, else create new one.


Iterated over scene objects rather than all objects in blend.
If the object already has a modifier named "foo" use it, otherwise
create a new one.


test code

import bpy
context = bpy.context

for ob in context.scene.objects:
     if ob.type == 'MESH':
         # get old one or add one
         m = ob.modifiers.get("My SubDiv") or ob.modifiers.new('My SubDiv', 'SUBSURF')
         m.levels = 1
         m.render_levels = 2
         m.quality = 3


oh and in case in testing you have ended up with a cluster of modifiers, here is an example of removing all modifiers with a name starting with "My SubDiv".

for ob in context.scene.objects:
     if ob.type == 'MESH':
         mods = [m for m in ob.modifiers
                 if m.name.startswith("My SubDiv")]
         while mods:
             ob.modifiers.remove(mods.pop())