This is a confusion I had when I did these problems. We are integrating from the outer shell of radius $R_2$ to the inner shell of radius $R_1 < R_2$. You're right then along such an integration path, the $d \vec{r}$ points "inwards", while $\vec{E}$ points "outwards", so their dot product is negative. But, this negative sign is already being taken into account when we write
\begin{align}
\int_{R_2}^{R_1} \dfrac{Q}{4 \pi \varepsilon_0 r^2} \, dr \tag{$*$}
\end{align}
Notice that the integrand $\dfrac{Q}{4 \pi \varepsilon_0r^2}$ is positive (since $Q>0$), BUT, we are integrating from $R_2$ to $R_1$ (from higher limit to lower limit).
In other words, in $(*)$, we are integrating a positive function, but "in the opposite direction", hence, the integral in $(*)$ is actually negative, which is exactly what we expected: $\int \vec{E} \cdot d \vec{r}< 0$ for the chosen path, based on the physical argument that the vectors point in opposite directions.
So, what is going on is that the fact that $d \vec{r}$ points "inwards" is already taken into account by the limits of integration. (for example, compare $\int_1^2 x^2 \, dx$ vs $\int_2^1 x^2 \, dx$)
While this is a good question to think about, I have the following suggestion for the future: if for example you work in spherical coordinates, always write
\begin{align}
\vec{E} = E_r \hat{r} + E_{\theta} \hat{\theta} + E_{\phi} \hat{\phi} \quad \text{and} \quad d\vec{r} = dr\, \hat{r} + r \, d \theta\, \hat{\theta} + r \sin \theta \, d \phi\, \hat{\phi}
\end{align}
so that the dot product is
\begin{align}
\vec{E} \cdot d \vec{r} = E_r\, dr + E_{\theta} r \, d \theta + E_{\phi} r \sin \theta \, d \phi
\end{align}
and carefully set up the limits of integration, and let the limits of integration take care of the sign of everything, because it is very dangerous to use these physical arguments to get the signs correct in integration, because we might unknowingly introduce extra minus signs.
But of course, at the end of a calculation, always check with basic physical intutition.
If this is still unconvincing, consider the following very simple example of line integration: let $\vec{F}(x,y,z) = \hat{x}$, be a constant unit vector field pointing in positive $x$ direction. Consider the straight-line path $C$ which starts at the point $(2,0,0)$ and ends at $(1,0,0)$, and now I ask you to compute
$\int_C \vec{F} \cdot d \vec{r}$.
Here, the curve is pointing to the left, i.e in the $-\hat{x}$ direction, while $\vec{F}$ points in $\hat{x}$ direction. So, of course, we expect the integral to be negative. But, if we naievely put $\vec{F} \cdot d \vec{r} = \hat{x} \cdot (-dx \, \hat{x}) = -dx$, and if you also put the limits of integration as $\int_2^1$, "because $C$ starts at $x=2$ and ends at $x=1$", then you'll incorrectly compute
\begin{align}
\int_C \vec{F} \cdot d \vec{r} &= \int_{2}^1 (-dx) = \int_1^2 \, dx = 2-1 = 1 > 0
\end{align}
So, we found the integral is positive when it should be negative. So, clearly, we have added an extra minus sign.
The thing to note is if you write $d\vec{r} = - dx \, \hat{x}$, then you need to reverse the integration limits as $\int_1^2$, even though $C$ starts from $x=2$ to $x=1$. To me this is very confusing, so I rather write
\begin{align}
\int_C \vec{F} \cdot d \vec{r} &= \int_{x=2}^{x=1} \hat{x} \cdot (dx \, \hat{x} + dy \, \hat{y} + dz \, \hat{z}) \\
&= \int_{x=2}^{x=1} dx \\
&= 1 - 2 \\
&= -1
\end{align}
This way, we are less likely to make sign errors.
Finally, here's another way of presenting the calculation, which is literally the definition of line intergals (the above calculations are merely ways of writing things when one does not wish to explicitly give a new letter such as $\gamma$ for the parametrization, and a new letter $t$ for the parameter). We have to first parametrize the curve under consideration. In this example, let us take the curve $\gamma:[0,1]\to\Bbb{R}^3$ defined as $\gamma(t)=(2-t,0,0)$. Note that $\gamma(0)=(2,0,0)$ and $\gamma(1)=(1,0,0)$, and $\gamma$ is a straight line, in other words, $\gamma$ is really a parametrization of the straight line segment, $C$, starting from $x=2$ and ending up at $x=1$. Now by definition of line integrals, we have
\begin{align}
\int_{C}\vec{F}\cdot\,d\vec{r}&=\int_0^1\langle\vec{F}(\gamma(t)),\gamma'(t)\rangle\,dt\\
&=\int_0^1\langle \hat{x}, -\hat{x}\rangle\,dt\\
&=-1.
\end{align}
So, you see, the fact that the "velocity" of the curve is $\gamma'(t)=-\hat{x}$ already takes into account the fact that the curve goes from $x=2$ to $x=1$.
+1
: Thank you for your answer. As you pointed out in $(2)$ there should not be any vector. It was a mistake on my part which went unnoticed. I'm sorry if that confused you. I hope the statement in parenthesis below $(*)$ regarding this could be removed as I fixed the issue in the question. – Vishnu Dec 17 '19 at 10:01