Microscopic modeling of contact formation between confined surfaces in solution