Structured optical fields (SOFs) with spatially inhomogeneous phase, amplitude, or polarization can excite substantially different optical responses in nanoscale scattering particles. Inhibition of low-order multipolar resonances, excitation of dark modes and anapoles, and spin and orbital angular momenta dichroism have been demonstrated, broadening the scope of nanoscale manipulations of optical resonances by using these engineered external SOFs. However, studying scattering effects illuminated by SOFs is more complicated than conventional plane wave illuminations, and the difficulty increases for scattering particles on a substrate. In this paper, we present explicit expressions of SOFs propagating through stratified media, or multilayered systems, and provide their beam-shape coefficients. Specifically, simple analytic expressions are provided for circularly symmetric Bessel beams passing through an interface. Then, scattering calculations for a dielectric sphere on a substrate illuminated by an evanescent optical vortex are performed via the $T$-matrix method, which yields accurate and efficient results as compared with finite element analysis. This paper will find practical applications in modeling SOFs for realistic configurations of scattering of particles on a substrate at nonplanar nonparaxial external light source illuminations.