Let $\Omega \subset \mathbb R^n$ $n \in \mathbb N$, be a smooth, bounded domain, $\tau \in \{0, 1\}$, $T > 0$, $g \in L^\infty((0, T); L^q(\Omega))$ for some $q \in (1, n)$ and $v_0 \in W^{1, q}(\Omega)$.
If $v \in C^0(\overline \Omega \times [0, T)) \cap C^{2, 1}(\overline \Omega \times (0, T))$ solves $$\begin{cases} \tau v_t = \Delta v - v + g, & \text{in $\Omega \times (0, T)$}, \\ \partial_\nu v = 0, & \text{on $\partial \Omega \times (0, T)$}, \\ \tau v(\cdot, 0) = \tau v_0, & \text{in $\Omega$} \end{cases}$$ classically, then $$ \sup_{t \in (0, T)} \|v(\cdot, t)\|_{W^{1, \frac{nq}{n-q}-\varepsilon}(\Omega)} \le C_\varepsilon. $$ for some $C_\varepsilon > 0$ and all $\varepsilon \gt 0$. For $\tau = 0$, this follows – even for $\varepsilon = 0$ – from elliptic regularity (which gives a bound in $L^\infty$-$W^{2, q}$) and embedding theorems, while for $\tau = 1$, one can make use of semigroup arguments.
Intuitively, this should be optimal. Question: Are there $g \in L^\infty((0, T); L^q(\Omega))$ (and smooth $v_0$) such that the corresponding solution is not uniformly-in-time bounded in $W^{1, p}(\Omega)$ for any $p \gt \frac{nq}{n-q}$?
I feel that this should be a classical result and hence I am happy for references to the literature. Also, for simplicity, we may assume that $\Omega$ is a ball and focus on the radially symmetric setting (but in arbitrary dimensions).
Meanwhile, I have realized that the problem becomes much easier if I use functional analytical arguments instead of trying to prove the statement by hand.
Let $\tau = 0$ and suppose that there is $c_1 \gt 0$ such that $\|v_g\|_{W^{1, p}(\Omega)} \le c_1 \|g\|_{L^q(\Omega)}$ for all $g$ belonging to, say, $C^\infty(\overline \Omega)$. (Here, $v_g$ denotes the (unique) solution with right hand side $g$.) Since moreover $\|g\|_{L^q(\Omega)} = \|(-\Delta + 1)v_g\|_{L^q(\Omega)} \le c_2 \|v_g\|_{W^{2, q}(\Omega)}$ for some $c_2 \gt 0$ and all $g$, we would have $\|v_g\|_{W^{1, p}(\Omega)} \le c_1 c_2 \|v_g\|_{W^{2, q}(\Omega)}$ for all such $g$. Since $g \mapsto v_g$ is a bijection between $L^q(\Omega)$ and $W_N^{2,q}(\Omega) := \{\,\varphi \in W^{2, q}(\Omega) : \partial_\nu \varphi = 0 \text{ on } \partial \Omega\,\}$ and $C^\infty(\overline \Omega)$ is dense in $L^q(\Omega)$, this implies that there is a continuous embedding from $W_N^{2, q}(\Omega)$ into $W^{1, p}(\Omega)$ implying $p \le \frac{nq}{n-q}$.
Or, in other words, for $p > \frac{nq}{n-q}$, take $v \in W_N^{2, q}(\Omega) \setminus W^{1, p}(\Omega)$ and approximate $g = -\Delta v + v$ to obtain a counterexample.