We investigate a semilinear problem for a fractional diffusion equation with variable order Caputo fractional derivative \(\left( \partial _t^{\beta (t)} u\right) (t)\) subject to homogeneous Dirichlet boundary conditions. The right-hand side of the governing PDE is nonlinear (Lipschitz continuous) and it contains a weakly singular Volterra operator. The whole process takes place in a bounded Lipschitz domain in \({{\mathbb {R}}}^d\) . We establish the existence of a unique solution in \(C\left( [0,T],L^{2} (\varOmega )\right) \) if \(u_0\in L^{2} (\varOmega )\) . Moreover, if \(\mathcal {L}^{\gamma }u_0\in L^{2} (\varOmega )\) for some \(0<\gamma <1-\frac{\delta }{\beta (0)}\) ( \(\delta \) depends on the right-hand-side of the PDE) then \(\mathcal {L}^{\gamma }u\in C\left( {[}0,T{]},L^{2} (\varOmega )\right) \) .