Bayesian estimation of boundary conditions with application to deep tunneling