Firstly, no continuous charge density is perfect, a real charge density would jump up inside every nucleus and then go negative in between the nuclei.
But what is supposed to go on, is that if you average the charge over a region large enough to contain many atoms but small enough that the density of how many protons versus electrons isn't changing very much then replace the density at that point with the average in that region then you should get the kind of charge densities you want to call physical.
Secondly, don't worry about the angles at the origin. This is a problem of the coordinate system (the coordinate system is not defined there) not a problem of the charge density.
You could rewrite
$$\rho(r,\theta,\phi)= k(R/r^2)(R-2r)\sin(\theta)$$
as
$$\rho(r,\theta,\phi)= k(R/r^3)(R-2r)r\sin(\theta)$$
And then as
$$\rho(x,y,z)= k\left(\frac{R^2-R\sqrt{x^2+y^2+z^2}}{(x^2+y^2+z^2)^{3/2}}\right)\sqrt{x^2+y^2}$$
and now all your concerns about angles are gone.
Also, at $r=0$, the denominator is zero, and then $\rho$ will be infinite. So is this a valid (i.e. physically possible) density function?
Sure, an infinite density requires seems to have an atom (with a finite charge) in an infinitesimally small region.
But really, what is a density? It is a thing you multiply by a little bit of volume to find out how much stuff is in a region. And when you pick a little finite bit of volume, and the mathematical density is different at different points in the volume then which value of the density are you supposed to choose. If the volume contains the origin it contains a whole (small) ball about the origin. And we can compute the charge in such a ball
$$Q=\int_0^\epsilon\int_0^\pi\int_0^{2\pi}\rho(r,\theta,\phi)r^2\sin\theta d\phi d\theta dr$$
Which after we do the angular integrals gives
$$Q=\int_0^\epsilon \pi^2kR(R-2r)dr=\pi^2kR(R\epsilon-\epsilon^2)$$
Which is perfectly finite when $\epsilon$ is small.