1.)
$$a_1x^2+a_2x+a_3+a_4e^{-2a_5x}+a_6xe^{-a_5x}+a_7e^{-a_5x}=0$$
$$(a_1x^2+a_2x+a_3)+a_4e^{-2a_5x}+(a_6xe+a_7)e^{-a_5x}=0$$
You can solve the equation in terms of elementary functions if you set some of the $a_1,...,a_7$ to zero so that the equation contains either $x$ or $e^x$.
If the equation can be transformed to a polynomial equation with nonzero degree of both $x$ and $e^x$ simultaneously without a univariate factor, we don't know how to solve for $x$ by rearranging the equation by applying only finite numbers of only elementary functions.
If $a_1,...,a_7$ all are algebraic numbers and the equation can be transformed to a polynomial equation with nonzero degree of both $x$ and $e^x$ simultaneously without a univariate factor, the equation cannot have solutions that are elementary numbers except $0$.
Let $c$ be a constant. The equation is solvable in terms of elementary functions together with the nonelementary special function Lambert W
- if there is only one exponential monomial and one $x$-power monomial,
- if there is only one $e^{cx}$ and one summand linear in $x$,
- if there are only two exponential summands, or
- if there are only one or two exponential summands with factors linear in $x$.
Also, the equation can be simplified to some of these cases if all summands have a power of $x$ as factor.
2.)
Following your way:
$$a_1x^2+a_2x+a_3+a_4e^{-2a_5x}+a_6xe^{-a_5x}+a_7e^{-a_5x}=0$$
$$a_1x^2(e^{a_5x})^2+a_2x(e^{a_5x})^2+a_3(e^{a_5x})^2+a_4+a_6xe^{a_5x}+a_7e^{a_5x}=0$$
$$e^{a_5x}=\frac{1}{2}\frac{(-a_6x-a_7+\sqrt{a_6^2x^2+2a_6xa_7+a_7^2-4a_4a_1x^2-4a_4a_2x-4a_4a_3}}{a_1x^2+a_2x+a_3},-\frac{1}{2}\frac{a_6x+a_7+\sqrt{a_6^2x^2+2a_6xa_7+a_7^2-4a_4a_1x^2-4a_4a_2x-4a_4a_3}}{a_1x^2+a_2x+a_3}$$
This equation is solvable by Lambert W if the right-hand side of the equation is a linear term of $x$ or are a constant multiplied by $x^2$.
This equation is solvable by the Generalized Lambert W of Mező et. al. if the right-hand side of the equation is a rational expression of $x$.
We can build the corresponding equation systems and solve for $a_1,...,a_7$.