*It looks like all the previous answers (including mine) are quite off by a huge margin, if the vector $a=(a_1,\ldots,a_n)$ is somewhat dense in the sense that $\|a\|_1/\|a\|_\infty$ is substantially larger than $1$. For example, if $a_i=1/n$ for all $i$, then we would expect to have the upper-bound to be of orde $\epsilon^{\Omega(n)}$, and not $\epsilon^{1/2}$. See Fact 2.1 of this blogpost.*

*In this post, I will provide an upper-bound which has somewhat optimal dependence on $a$.*

## Main tool: concentration function under affine transformation

Given a random vector $Y$ taking values in $\mathbb R^m$, its *concentration function* is defined by setting, for any $\epsilon \ge 0$,

$$
\mathcal L(Y,\epsilon) := \sup_{y \in \mathbb R^m} \mathcal L_y(Y,\epsilon),\text{ where }\mathcal L_y(Y, \epsilon) := \mathbb P(\|Y-y\|_2 \le \epsilon).
$$

Now, let $A$ be a deterministic $m \times n$ matrix and let $X=(X_1,\ldots,X_n)$ be a random vector taking values in $\mathbb R^n$, with independent components verifying
$$
\max_{1 \le i \le n}\mathcal L(X_i,\epsilon) \le \ell(\epsilon).
$$
It is well-known (e.g see **Theorem 1.5** of this paper by M. Rudelson) that for any $\delta \in (0,1)$, there exists a positive constant $C_\delta$ such that
$$
\mathcal L(AX,\epsilon\|A\|_{HS}) \le (C_\delta \ell(\epsilon))^{(1-\delta)r(A)},
$$
where $r(A) := \|A\|_{HS}^2/\|A\|_{op}^2 \ge 1$. In particular, if the $X_i$'s have standard normal distribution, then we may take $\ell(\epsilon)=\epsilon$,
and get for any $\epsilon \ge 0$ and $\delta \in (0,1)$,
$$
\mathcal L(AX,\epsilon\|A\|_{HS}) \le (C_\delta \epsilon)^{(1-\delta)r(A)}.
$$

## Application to OP's question

In particular, taking $A$ to be the $n \times n$ diagonal matrix $\mbox{diag}(\sqrt a)$ with $a = (a_1,\ldots,a_n)$, we have

$$
\begin{split}
\mathbb P(\sum_{i=1}^n a_i X_i^2 \le \epsilon \sum_{i=1}^n a_i) &= \mathbb P(\|AX\|_2 \le \sqrt\epsilon\|A\|_{HS})\\
& = \mathcal L_0(AX, \sqrt\epsilon\|A\|_{HS})\\
& \le \mathcal L(AX,\sqrt\epsilon\|A\|_{HS}) \\
&\le (C_\delta \sqrt \epsilon)^{(1-\delta)r(A)}\\
& = (C_\delta \sqrt{\epsilon})^{(1-\delta)s(a)},
\end{split}
$$
where $s(a) := \|a\|_1 / \|a\|_\infty \in [1,n]$ measures the sparsity of $a$. As a sanity check, if $a_i=c > 0$ for all $i \in [n]$, then $s(a) = \|a\|_1 / \|a\|_\infty = n$, and our upper-bound above recovers the correct order in $\epsilon$, namely $\epsilon^{\Omega(n)}$.

1more comment