We study the behavior of charged spherical Au nanoparticles in a nanofluidic slit as a function of the separation of the symmetrically charged confining surfaces. A dedicated setup called the nano-fluidic confinement apparatus allows us to parallelize the two confining surfaces and to continuously approach them down to direct contact. Interferometric scattering detection is used to measure the particle contrast with 2 ms temporal resolution. We obtain the confinement gap distance from the interference signal of the glass and the oxide-covered silicon wafer surface with nanometer accuracy. We present a three parameter model that describes the optical signal of the particles as a function of particle height and gap distance. The model is verified using nanoparticles immobilized at the glass and the substrate surface. For freely diffusing particles, the envelope of the particle signal as a function of gap distance and the known particle height at tight confinement is used to calibrate the particle signal in situ and obtain all free model parameters. Due to the periodic contrast variation for large gap distances, we obtain a set of possible particle heights for a given contrast value. For a range of small gap distances, this assignment is unique, and the particle height can be measured directly with high accuracy. The high temporal resolution allows us to measure the height occupation probability, which provides a direct link to the free-energy landscape the particles are probing via the Boltzmann distribution. Accordingly by fitting the results to a physical model based on the linear superposition approximation, the physical parameters governing the particle-glass interaction are quantified.