$\def\d{\mathrm{d}}$Suppose that $A_1$ and $A_2$ are measurable sets contained in $[0, 1]$. If there exist $0 \leqslant a_1 < a_2 < \cdots$ such that\begin{align*} \int_{A_1} x^{a_n} \,\d x = \int_{A_2} x^{a_n} \,\d x, \quad \forall n \in \mathbb{N}_+ \end{align*} is it necessarily true that $m(A_1 \setminus A_2) = m(A_2 \setminus A_1) = 0$? (Here $m(\,·\,)$ is the Lebesgue measure on $\mathbb{R}$.)
My progress so far:
If $m(A_1 \setminus A_2) = 0$ or $m(A_2 \setminus A_1) = 0$, the assertion is true since $y = x^{a_1}$ is a continuous function on $(0, 1]$. So next it can be assumed that $m(A_1 \setminus A_2) > 0$ and $m(A_2 \setminus A_1) > 0$.
Now, if $A_1$ and $A_2$ are “seperated,” i.e. there exists $x_0 \in (0, 1)$ such that$$ \begin{cases} m(A_1 \setminus [x_0, 1]) = 0\\ m(A_2 \setminus [0, x_0]) = 0 \end{cases} \text{ or } \begin{cases} m(A_1 \setminus [0, x_0]) = 0\\ m(A_2 \setminus [x_0, 1]) = 0 \end{cases} $$ (assuming the first scenario for simplicity), and if $\lim\limits_{n → ∞} a_n = +∞$, then the assertion can be proved as below: Since $m(A_2 \setminus [0, x_0]) = 0$ and $m(A_2 \setminus A_1) > 0$ imply that$$ m(A_2 \setminus (A_1 \cup [0, x_0])) > 0, $$ then the regularity of Lebesgue measure implies that $A_2 \setminus (A_1 \cup [0, x_0])$ contains an open interval $(x_1, x_2)$. Thus\begin{gather*} \frac{x_0^{a_n + 1}}{a_n + 1} = \int_0^{x_0} x^{a_n} \,\d x \geqslant \int_{A_1} x^{a_n} \,\d x\\ = \int_{A_2} x^{a_n} \,\d x \geqslant \int_{x_1}^{x_2} x^{a_n} \,\d x = \frac{1}{a_n + 1} (x_2^{a_n + 1} - x_1^{a_n + 1}), \end{gather*} which implies that$$ \left( \frac{x_0}{x_1} \right)^{a_n + 1} \geqslant \left( \frac{x_2}{x_1} \right)^{a_n + 1} - 1. \quad \forall n \geqslant 1 $$ But making $n → ∞$ yields a contradiction.
Update 1: The reasoning above is false as is explained in @zhw's (deteled) answer.
Update 2: I would also award the bounty to any answer that proves the assertion in details with additional but mild assumptions on $\{a_n\}$.