Update mesh after using bmesh in object mode
Try:

# need to update here
bm.to_mesh(me)


But then you'll need to switch to edit mode to see the selection.

As an alternative, you can do the selection entirely in edit mode with the following:

mesh = bpy.context.object.data
bm = bmesh.from_edit_mesh(mesh)

bm.edges.ensure_lookup_table()
bm.edges[2].select = True

bmesh.update_edit_mesh(mesh)