In MeshLab it is too complicated:
After aligning two layers,
Merge this two layers in new one.
Compute new UV with Voronoi Atlas (it take too much time for 100000-200000 tris, for 1-1.5mln it probably will need infinity for finish)
After this transfer textures from old layers to new. And because it probably work only between 2 layers, you can't transfer from first 2 to 3rd.
In Lightwave3D (probably in MODO, and i hope other commercial 3D apps) you just open 2 objects, rename objects materials to Mat1 and Mat2 and merge layers to 1 layer. And as result you have 1 object with 2 different materials.
Other probably can merge 2 UVs to one UDIM UV.