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 $0leq k < N-2$. We consider the Schrodinger 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$