I think a relatively simple explanation is that on one hand mercury is liquid due to its closed-shell (a bit "noble-gas-like") electron configuration: [Xe] 4f14 5d10 6s2 and that it since its electrons are paired it makes it less energetically favorable to create strong bonds. So consequently Hg does not form conventional, strong covalent bonds (although it probably does form some weak van der Waals complex) like, for example, gold (with the unpaired electron on 6s orbital so [Xe] 4f14 5d10 6s1 configuration) and other "horizontally neighboring" elements which consequently create stronger bonds. However, this alone is not enough and would not explain why Cd isn't liquid.
And here come the relativistic effects, which essentially scale with nuclear charge of the nucleus come to play and they are significantly stronger for Hg than Cd. If I remember correctly (although I read about it a long time ago so I may be a bit rusty) these strong relativistic effects cause something called "relativistic contraction of the 6s orbital" which results in the electrons on this orbital being more strongly bound than they would be, if there would be no relativistic effects (which can be theoretically compared by setting c -> infinity in the equations used to solve electronic structure theory). AFAIR Copernicium should also be liquid in room temperature for similar reasons, but since it is not very long lived and it is difficult to produce testing this will likely be very hard if not impossible to check (though if I remember correctly there was something called "relativistic maximum" which happens in the 6th and not 7th row of periodic table for some reason, so it should be higher than for mercury; though I can't remember the details why this is so).
Of course this is a bit simplified picture and there are surely more details regarding how exactly relativistic effects influence the energies and consequently how this influences the melting temperature of mercury (I suppose they are in the Calvo, Pahl, Wormit and Schwerdtfeger paper linked earlier in this thread), but I think the combination of the electron configuration and strong relativistic effects explain why other neighbors are not liquid.