How can I replace all selected object's mesh?
You can change the mesh assigned to an object in the data tab:

In order to change more objects you could use python:
import bpy

# the name of the mesh to copy to all selected objects
mesh = bpy.data.meshes[&quot;Cube&quot;]

for o in bpy.data.objects:
    if o.select:
        o.data = mesh

For 2.8+
Python: Selecting object by name in 2.8
if o.select_get():
    o.data = mesh