EDIT - Maxime has answer the question in the comments. The desired $h$ is not a function of the lengths $\ell_1, \ell_2, \ell_3$, but rather lies in an open interval. The minimum (resp. maximum) of $h$ is achieved by sewing the first circle shut so it lies along a concentric (resp. radial) arc of the resulting annulus. See Figure 46e in Nehari's book for a picture of the concentric case.
I wrote the following under the assumption that there is a unique best way to attach a disk. I'll leave it here as it seems like a particularly nice intermediate case.
%%%
It suffices to answer the following question.
Fix six real numbers $A = \{a_0, a_1, \ldots a_5\}$ with $a_i < a_{i+1}$. We construct a right-angled hexagon $H_A$ in the complex plane by connecting $a_0$ to $a_1$, connecting $a_2$ to $a_3$, and connecting $a_4$ to $a_5$ by line segments, contained in the real axis. We then connect $a_5$ to $a_0$, connect $a_1$ to $a_2$, and connect $a_3$ to $a_4$ by arcs of circles orthogonal to the real axis, contained in the upper half plane.
$H_A$ appears to have six degrees of freedom, but these are reduced to just three after translating, scaling, and applying a Mobius transformation that preserves the real axis as well as $a_0$ and $a_5$. One must uniformize this hexagon (ie compute the hyperbolic lengths of the sides) to answer your question. I think this is a variant of the Schwarz-Christoffel transformation, but I failed to find a reference after looking for a bit. Perhaps look in Nehari's book "Conformal mappings".
That done, it is easy to double the hexagon across the real axis and apply a Mobius transformation to make the sides corresponding to $l_2$ and $l_3$ concentric. The log of the ratio of their radii now gives the desired modulus.