We put the permittivity $\varepsilon=1$ to one from now on. Let us first rephrase the question a bit. Instead of starting from the potential
$$\Phi=\frac{1}{r} \qquad \mathrm{and} \qquad \Phi=\frac{1}{2r^2}, \qquad r\neq 0, $$
respectively, let us assume that the electric field has be given as
$$\vec{E}=\frac{\vec{r}}{r^3} \qquad \mathrm{and} \qquad\vec{E}= \frac{\vec{r}}{r^4},\qquad r\neq 0,$$
respectively, and we want to know the charge density $\rho=\vec{\nabla} \cdot \vec{E}$, in particular, at the origin $r=0$. For $r\neq 0$, the charge density is
$$\rho=0 \qquad \mathrm{and} \qquad \rho=-\frac{1}{r^4},\qquad r\neq 0,$$
respectively. This rephrasing is just so we only have to differentiate one time instead of two times, but the argument is in principle the same, cf. footnote $1$.
A minor issue is that the electric field $\vec{E}$ has not been specified at $r=0$. A way to make sense of this is to use distributions and test functions $f\in C^{\infty}_c(\mathbb{R}^3)$, i.e., infinitely often differentiable functions $f$ with compact support. We now declare that a smeared electric field $E^i$ is
$$ E^i[f] = \int_{\mathbb{R}^3} d^3r \ E^i(\vec{r})f(\vec{r}).$$
A Lebesgue majorant of the integrand is
$$\frac{|f(\vec{r})|}{r^2} \qquad \mathrm{and} \qquad \frac{|f(\vec{r})|}{r^3},\qquad r\neq 0,$$
respectively. Only the first case is Lebesgue integrable in $\mathbb{R}^3$. This is the heart of the problem. In the second case, even after smearing with a test function $f$, the electric field $E^i$ does not make sense as a distribution.
In distribution theory, the derivative of a distribution is always defined by applying the derivative to the test function with a minus sign$^{1}$. If $E^i$ is a distribution, we can carry out the next step to define the derivative of $E^i$,
$$-\vec{\nabla} \cdot \vec{E}[f] = \int_{\mathbb{R}^3} d^3r \ \vec{E}(\vec{r})\cdot\vec{\nabla} f(\vec{r}) =\lim_{\varepsilon\to 0} \int_{\{r\geq\varepsilon\}} d^3r \ \vec{E}(\vec{r})\cdot\vec{\nabla} f(\vec{r}) $$
$$ =\lim_{\varepsilon\to 0} \int_{\{r\geq\varepsilon\}} d^3r \left[ \vec{\nabla} \cdot\left( \vec{E}(\vec{r})f(\vec{r})\right)-f(\vec{r}) \underbrace{\vec{\nabla} \cdot \vec{E}(\vec{r})}_{=0}\right] $$
$$ =-\lim_{\varepsilon\to 0} \int_{\{r=\varepsilon\}} d^2\vec{A} \cdot \vec{E}(\vec{r})f(\vec{r})=-\lim_{\varepsilon\to 0} \int_{\{r=\varepsilon\}} \frac{d^2A}{\varepsilon^2}f(\vec{r}) =-4\pi f(0), $$
where we performed the well-known manipulations in the first case to show that
$$ \vec{\nabla} \cdot\frac{\vec{r}}{r^3} = 4\pi\delta^3(\vec{r}). $$
Well, so much for distribution theory and mathematical idealization. In reality, the $\frac{-1}{r^4}$ charge density, $r\neq 0$, would break down as we approach the singularity $r\to 0$, so that we never get to ask: What sits at $r=0$? This leads to the idea of regularization
$$\Phi_{\varepsilon}=\frac{1}{\sqrt{r^2+\varepsilon}} \qquad \mathrm{and} \qquad \Phi_{\varepsilon}=\frac{1}{2(r^2+\varepsilon)}, \qquad \varepsilon>0,$$
respectively. The regularized charge density $\rho_{\varepsilon}=-\vec{\nabla}^2\Phi_{\varepsilon}\in C^{\infty}(\mathbb{R}^3)$ is
$$\rho_{\varepsilon}=\frac{3\varepsilon}{(r^2+\varepsilon)^{\frac{5}{2}}} \qquad \mathrm{and} \qquad \rho_{\varepsilon}=\frac{3\varepsilon-r^2}{(r^2+\varepsilon)^{3}}, \qquad \varepsilon>0,$$
respectively. We can now smear with a test function $f$. It is straightforward to check that the first $\rho_{\varepsilon}$ becomes $4\pi\delta^3(\vec{r})$ as $\varepsilon\to0$, while the second $\rho_{\varepsilon}$ does not make sense as a distribution when $\varepsilon\to0$.
$^{1}$ In the second case, we could in principle define the smeared potential
$$ \Phi[f] = \int_{\mathbb{R}^3} d^3r \ \Phi(\vec{r})f(\vec{r}),$$
because $\Phi=\frac{1}{2r^2}$, $r\neq 0$, is locally Lebesgue integrable in $\mathbb{R}^3$, and then define the electric field as a distribution
$$ \vec{E}[f] = \Phi[\vec{\nabla} f] = \int_{\mathbb{R}^3} d^3r \ \Phi(\vec{r})\vec{\nabla}f(\vec{r}),$$
so that
$$-\vec{\nabla} \cdot \vec{E}[f] = \int_{\mathbb{R}^3} d^3r \ \Phi(\vec{r})\vec{\nabla}^2 f(\vec{r}) = \lim_{\varepsilon\to 0} \int_{\{r\geq\varepsilon\}} d^3r \ \Phi(\vec{r})\vec{\nabla}^2 f(\vec{r}).$$
However, this mathematical construct is not as useful in practice as one might naively have hoped for. For instance, if we try to integrate by part, we essentially get back to the problem that the electric field $\vec{E}= \frac{\vec{r}}{r^4}$, $r\neq 0$, is not locally Lebesgue integrable in $\mathbb{R}^3$.