You can prove that it's a simple ground loop caused by connecting the input grounds together quite simply:
Set it up so that the hum occurs with the effects connected to both amps.
Disconnect the inputs to both amps and check that the hum stops.
Connect the amps' inputs together with a single cable and if there is an earth loop, the hum should be present again.
Either the method I suggested of disconnecting the ground in one signal lead or the isolation transformer linked to above should work, but before modifying a cable or buying an isolator, make sure your signal leads are o.k.
When a ground loop occurs, the hum present in the shielded conductor of the lead is in series with the guitar or effects output and presents itself as a signal to the amplifier's input. If the shielded conductor has a higher than normal resistance, then the hum level will be higher.
Try the above test with a variety of leads and you might find that you have one which causes the hum to be worse than the others. If this is one of the two leads which are causing the problem, then try replacing it.
Steve.