Some quick comments to anyone thinking about the injectivity 'recommendation' that most books have (mine...Spivak's Calculus...included). I am a total novice in maths, so maybe this opinion should be disregarded, but I absolutely loathe the notation that is taught in integration: I think it completely obfuscates what is going on, which is not helpful for beginners like myself. In light of this, first note that, in the context of the OP's problem, we can view $\int_0^{2\pi}xdx$ as being a definite integral of the identity function $I(x)$. Then, letting $g(x)=\arcsin(x)$ and $g'(x)=\arcsin'(x)=\frac{1}{\sqrt{1-x^2}}$, in accordance with the substitution theorem mentioned in ryang's answer...and, for just a second leaving the bounds of integration in a state of ambiguity...we have: $\int_0^{2\pi}I(x)dx=\int_a^b I \circ g(x) \cdot g'(x)dx$. We will refer to this expression as $(\dagger_1)$.
Next, let us deal with the bounds of integration. The theorem states that our $(\dagger_1)$ should have bounds of integration in the following form: $\int_{g(a)}^{g(b)}I(x)dx=\int_a^b I \circ g(x) \cdot g'(x)dx$. Seeing as we 'start out' with the integral $\int_{g(a)}^{g(b)}I(x)dx$, where $g(b)=2\pi$ and $g(a)=0$, let us see if we can deduce what the values $a$ and $b$ should be on the right side of the equality in $(\dagger_1)$.
We know that $g(x)=\arcsin(x)$. So consider the expression: $g(a)=\arcsin(a)$, which, given the knowns, is $g(a)=\arcsin(a)=0$. By definition, the domain of $\arcsin$ is $[-1,1]$, its range is $[-\frac{\pi}{2},\frac{\pi}{2}]$ and is the inverse function of a domain restricted $\sin$ function (where that domain is, by definition, restricted to $[\frac{\pi}{2},\frac{\pi}{2}]$). As such, we can compute: $[g^{-1}\circ g] (a)=[\sin \circ \arcsin] (a)=\sin(0)=0$. So $a=0$. Now what about $b$?
Well, we have $g(b)=\arcsin(b)$ and, given the knowns, we would have the expression $g(b)=\arcsin(b)=2\pi$...but this expression is nonsense because there is no $b$ in the domain of $\arcsin$ that is mapped to $2\pi$, as pointed out by Andre Nicolas in the comments section. Interpreting $(\dagger_1)$ in the context of set theory, we could think of this as asking:
What elements reside in the following set $\displaystyle S=\left\{b \in \mathbb R :\int_0^{2\pi}I(x)dx=\int_0^{b}\frac{I(x)\circ \arcsin(x)}{\sqrt{1-x^2}}dx\right\}$
The answer is simple: none. There are no elements in this set...i.e $S=\emptyset$.
Now, if you choose to break up the integral as ryang and robjohn did, and chose to implement multiple functions...i.e. $g_1=\arcsin$, $g_2=\pi-\arcsin$, and $g_3=2\pi+\arcsin$, then you're fine...but, obviously, none of these functions are equal to one another.
NOTE - the above statements have nothing to do with injectivity. The failure of the original function has nothing to do with injectivity...the success of the recommended multiple-function-switch-up has nothing to do with injectivity.
So, in the event someone actually wants to investigate injectivity in the context of the integral substitution theorem, move on to the following section.
In order to address this subject adequately, I will use two different examples. We will still use the general structure of the integral $\int_{g(a)}^{g(b)} x dx$...which I will refer to as $\int_{g(a)}^{g(b)} I(x) dx$...but the bounds of integration will be different as we go through the different situations (specifically, as we explore different $g$).
For the first example, let us consider $\int_{0}^{1}I(x)dx$ and the function $g(x)=x^2$, with $g'(x)=2x$. Suppose we have the expression: $\int_0^1I(x)dx=\int_a^b I\circ g(x)\cdot g'(x)dx=\int_a^b 2x^3$. We have $g(b)=b^2=1$ and $g(a)=a^2=0$. The solution to the latter is simply $a=0$. However, for the former, we have that $(-1)^2=1$ and $(1)^2=1$ (note that this is different from the $\arcsin$ example, as, this time, $1$ is in the range of the square function). So we have two cases: $b=1$ or $b=-1$...i.e. $\int_0^1 I(x)dx=\int_0^{-1}2x^3dx$ or $\int_0^1 I(x)dx=\int_0^{1}2x^3dx$. In the first case, we get: $\frac{x^4}{2} \Big|^{-1}_0=\frac{1}{2}$. In the second case, we get: $\frac{x^4}{2} \Big|^{1}_0=\frac{1}{2}$. Seeing as $\int_0^1 I(x)dx=\frac{x^2}{2} \Big|^{1}_0=\frac{1}{2}$, it is clear that the lack of injectivity of our $g$ function did not even matter.
Let's consider the second example, where we change our bounds of integration as follows: $\int_1^4 I(x)dx$. Following the same routine as above, where $g(x)=x^2$, we need to find the values of $a,b$ for the following expression: $\int_1^4 I(x)dx=\int_a^b 2x^3 dx$. Unlike our first example, we see that both $a$ and $b$ will take on different solutions: $a=1 \lor a=-1$ and $b=2 \lor b=-2$. This means that our bounds of integration can take on several different forms:
$\int_1^4 I(x)dx=\int_{-1}^2 2x^3dx$, which equals: $\frac{x^4}{2} \Big|_{-1}^{2}=\frac{15}{2}$
$\int_1^4 I(x)dx=\int_{-1}^{-2} 2x^3dx$, which equals: $\frac{x^4}{2} \Big|_{-1}^{-2}=\frac{15}{2}$
$\int_1^4 I(x)dx=\int_{1}^{2} 2x^3dx$, which equals: $\frac{x^4}{2} \Big|_{1}^{2}=\frac{15}{2}$
$\int_1^4 I(x)dx=\int_{1}^{-2} 2x^3dx$, which equals: $\frac{x^4}{2} \Big|_{1}^{-2}=\frac{15}{2}$
Of course, $\int_1^4 I(x)dx=\frac{x^2}{2} \Big|_{1}^{4}=\frac{15}{2}$. Once again, we see that the lack of injectivity of the function $g$ did not affect us.