We report on a self-consistent microscopic study of the DC Josephson effect in $SINIS$ junctions where screened dipole layers at the $SN$ interfaces generate a double-barrier multilayered $SIN$ structure. Our approach starts from a microscopic Hamiltonian defined on a simple cubic lattice, with an attractive Hubbard term accounting for the short coherence length superconducting order in the semi-infinite leads, and a spatially extended charge distribution (screened dipole layer) induced by the difference in Fermi energies of the superconductor $S$ and the clean normal metal interlayer $N$. By employing the temperature Green function technique, in a continued fraction representation, the influence of such spatially inhomogeneous barriers on the proximity effect, current-phase relation, critical supercurrent and normal state junction resistance, is investigated for different normal interlayer thicknesses and barrier heights. These results are of relevance for high-$T_c$ grain boundary junctions, and also reveal one of the mechanisms that can lead to low critical currents of apparently ballistic $SNS$ junctions while increasing its normal state resistance in a much weaker fashion. When the $N$ region is a doped semiconductor, we find a substantial change in the dipole layer (generated by a small Fermi level mismatch) upon crossing the superconducting critical temperature, which is a new signature of proximity effect and might be related to recent Raman studies in Nb/InAs bilayers.