  A geometric quantization using the topological recursion is established for
the compactified cotangent bundle of a smooth projective curve of an arbitrary
genus. In this quantization, the Hitchin spectral curve of a rank $2$
meromorphic Higgs bundle on the base curve corresponds to a quantum curve,
which is a Rees $D$-module on the base. The topological recursion then gives an
all-order asymptotic expansion of its solution, thus determining a state vector
corresponding to the spectral curve as a meromorphic Lagrangian. We establish a
generalization of the topological recursion for a singular spectral curve. We
show that the partial differential equation version of the topological
recursion automatically selects the normal ordering of the canonical
coordinates, and determines the unique quantization of the spectral curve. The
quantum curve thus constructed has the semi-classical limit that agrees with
the original spectral curve. Typical examples of our construction includes
classical differential equations, such as Airy, Hermite, and Gau\ss\
hypergeometric equations. The topological recursion gives an asymptotic
expansion of solutions to these equations at their singular points, relating
Higgs bundles and various quantum invariants.
