[guided]We first translate the PDE for densities into the standard Wasserstein language. Define
\begin{align*}
\mu:I&\to\mathcal P_2(\mathbb R^n)
\end{align*}
\begin{align*}
t&\mapsto \mu_t:=\rho_t\,d\mathcal L^n
\end{align*}
and
\begin{align*}
v:I\times\mathbb R^n&\to\mathbb R^n
\end{align*}
\begin{align*}
(t,x)&\mapsto v_t(x):=\nabla\phi_t(x).
\end{align*}
The point of this notation is that Wasserstein tangent vectors are represented by vector fields $v_t$ through the measure-valued continuity equation.
Let $\zeta\in C_c^\infty(I\times\mathbb R^n)$ be a [test function](/page/Test%20Function). Since $\rho_t$ and $\phi_t$ have the decay required in the statement, [integration by parts](/theorems/2098) in the spatial variable produces no boundary term at infinity. Multiplying
\begin{align*}
\partial_t\rho_t+\operatorname{div}(\rho_t\nabla\phi_t)=0
\end{align*}
by $\zeta$ and integrating over $I\times\mathbb R^n$ with respect to $\mathcal L^1\otimes\mathcal L^n$ gives
\begin{align*}
\int_I\int_{\mathbb R^n}\zeta(t,x)\partial_t\rho_t(x)\,d\mathcal L^n(x)\,d\mathcal L^1(t)
+
\int_I\int_{\mathbb R^n}\zeta(t,x)\operatorname{div}(\rho_t\nabla\phi_t)(x)\,d\mathcal L^n(x)\,d\mathcal L^1(t)
=0.
\end{align*}
Integrating the first term by parts in $t$ and the second term by parts in $x$ yields
\begin{align*}
-\int_I\int_{\mathbb R^n}\partial_t\zeta(t,x)\rho_t(x)\,d\mathcal L^n(x)\,d\mathcal L^1(t)
-
\int_I\int_{\mathbb R^n}\nabla_x\zeta(t,x)\cdot\nabla\phi_t(x)\rho_t(x)\,d\mathcal L^n(x)\,d\mathcal L^1(t)
=0.
\end{align*}
Multiplying by $-1$ and using $v_t=\nabla\phi_t$, we obtain
\begin{align*}
\int_I\int_{\mathbb R^n}\partial_t\zeta(t,x)\,d\mu_t(x)\,d\mathcal L^1(t)
+
\int_I\int_{\mathbb R^n}\nabla_x\zeta(t,x)\cdot v_t(x)\,d\mu_t(x)\,d\mathcal L^1(t)
=0.
\end{align*}
This is precisely the distributional continuity equation for the measure curve $(\mu_t)_{t\in I}$ driven by the velocity field $(v_t)_{t\in I}$.[/guided]