Let $$X_t = \int_0^t \sigma(s) dW_s$$ denote a stochastic integral in the Itô sense. In that case one can write $r_t = f(t,X_t)$ where $$f:(t,x) \to c + \int_0^t \sigma^2(s)(t-s) ds + x \tag{1}$$
and use Itô's lemma to compute the differential
$$ dr_t = \partial_t f(t,X_t) dt + \partial_x f(t,X_t) dX_t + \partial_{xx} f(t,X_t) d\langle X \rangle_t $$
where from $(1)$
\begin{align}
\partial_t f(t,X_t) &= \partial_t \int_0^t \sigma^2(s)(t-s) ds \\
&= \int_0^t \sigma^2(s) ds + 1 (\sigma^2(t)(t-t)) - 0 (\sigma^2(0)(0-s)) \\
&= \int_0^t \sigma^2(s) ds
\end{align}
from Leibniz integral rule and
$$ \partial_x f(t,X_t) = 1,\quad \partial_{xx} f(t,X_t) = 0 $$
along with, by definition of the Itô integral:
$$ dX_t = \sigma(t) dW_t,\quad d\langle X \rangle_t = \sigma^2(t) dt $$
such that finally:
$$ dr_t = \left(\int_0^t \sigma^2(s) ds\right) dt + \sigma(t) dW_t $$
And indeed by integrating this last equation from $0$ to $t$ one gets:
$$ r_t - r_0 = \int_0^t \left( \int_0^u \sigma^2(s) ds\right) du + \int_0^t \sigma(u) dW_u $$
and noting that
\begin{align}
\int_0^t \int_0^u \sigma^2(s) ds du &= \int_0^t \int_s^t \sigma^2(s) du ds\\
&= \int_0^t \sigma^2(s) (t-s) ds
\end{align}
by Fubini theorem, one gets
$$ r_t = r_0 + \int_0^t \sigma^2(s) (t-s) ds + \int_0^t \sigma(s) dW_s $$