Impact of dielectric permittivity of a substrate on the THz scattering enhanced due to near-field effect