  Let $\Omega \subset \mathbb{R}^N$ ($N \geq 3$) be a $C^2$ bounded domain and
$K \subset \Omega$ be a compact, $C^2$ submanifold in $\mathbb{R}^N$ without
boundary, of dimension $k$ with $0\leq k < N-2$. We consider the Schr\"odinger
operator $L_\mu = \Delta + \mu d_K^{-2}$ in $\Omega \setminus K$, where $d_K(x)
= \text{dist}(x,K)$. The optimal Hardy constant $H=(N-k-2)/2$ is deeply
involved in the study of $-L_\mu$. When $\mu \leq H^2$, we establish sharp,
two-sided estimates for Green kernel and Martin kernel of $-L_\mu$. We use
these estimates to prove the existence, uniqueness and a priori estimates of
the solution to the boundary value problem with measures for linear equations
associated to $-L_\mu$
