The author considers the monodromy map of a Schrödinger equation of the form $\partial^2\phi +(S/2 - Q)\phi = 0$ on a punctured Riemann surface ${\cal C}$ of genus $g$ with $n$ punctures $z_1,\ldots,z_n$, where $S$ is a fixed projective connection on ${\cal C}$ with at most simple poles at the $z_j$ and depends holomorphically on moduli of ${\cal M}_{g,n}$, and $Q$ is a (varying) quadratic differential with double poles at the $z_j$ and is free from saddle trajectories. The author first gives a condition on $S$ for the monodromy map to be a symplectomorphism and then discusses a generalized WKB expansion of the corresponding generating function (the Yang-Yang function), computing explicitly the first three terms.