Let's start with Gauss's law and the relationship between the polarization density $\mathbf{P}$, the electric field $\mathbf{E}$, and the electric displacement field $\mathbf{D}$:
$$\begin{align*}\nabla\cdot\mathbf{E}&=\frac{\rho}{\varepsilon_0}\\\mathbf{D}&=\varepsilon_0\mathbf{E}+\mathbf{P}\end{align*}$$
Take the divergence of the second relation:
$$\begin{align*}\nabla\cdot\mathbf{D}&=\nabla\cdot(\varepsilon_0\mathbf{E}+\mathbf{P})\\&=\varepsilon_0\nabla\cdot\mathbf{E}+\nabla\cdot\mathbf{P}\\&=\rho+\nabla\cdot\mathbf{P}\\&=\rho-\rho_\mathrm{bound}\\&=\rho_\mathrm{free}\end{align*}$$
So we have a differential equation relating the electric displacement field to the free charge in a region. By the divergence theorem this has an equivalent integral formulation: $$\oint_A\mathbf{D}\cdot\mathrm{d}\mathbf{A}=Q_\mathrm{free}$$
Your capacitor situation is really an approximation because it has finite size. So let us actually consider a region of area $A$ in a capacitor of infinite extent (this ensures all $\mathbf{D}$-field lines are perpendicular to the plates). Take a Gaussian pillbox with area of sides parallel to the plates $A$ around one of the capacitor plates, and evaluate the above integral over this region. Because the $\mathbf{D}$-field is parallel to all faces other than the two of area $A$, only they can contribute to the above integral. The face on the outside of the capacitor contributes nothing because the $\mathbf{D}$-field is 0 in this region, so the result of this integration becomes: $$DA=Q_\mathrm{free}$$
which is ultimately the origin of your expression for the charge on the plates.
When thinking of how the charge on the plates relates to the dielectric material, you can basically consider the following: an external electric field will polarize the medium. This polarization acts to reduce the intensity of the electric field. For a scenario with boundary conditions in terms of $V$ (like charging the plates of a capacitor), more charges will need to put onto the plates to build the same potential difference.