Yes, it is.
The "flaw" in your purported counterexample to the validity of:
(A) --- $∃x(Qx \rightarrow ∀xQx)$
is that you are "reading" it as : $∃xQx \rightarrow ∀xQx$, which is not [this is implied by the structure $\mathcal A$ with universe $|\mathcal A| = \{ a,b \}$ such that $Q^{\mathcal A} = \{ a \}$].
We prove the vaildity of (A) in two ways.
Formal proof
We have that :
$\vdash (∀xβ \rightarrow α) \leftrightarrow ∃x(β \rightarrow α)$, if $x$ does not occur free in α [see this post for the proof].
If we apply it to (A), we get :
(B) ---$∀xQx \rightarrow ∀xQx$
which is clearly valid.
Semantic proof
Consider an interpretation $\mathcal A$ whatever and consider the conditional : $Qx \rightarrow ∀xQx$ : if $Qx$ holds for all $x$, then the conditional is true; thus, also $∃x(Qx \rightarrow ∀xQx)$ is.
If there is an object $a \in |\mathcal A|$ such that $a \notin Q^{\mathcal A}$ , then $\forall xQx$ is false.
Now, what is the condition for $\mathcal A \vDash \exists x \varphi[s]$ , i.e. such that $\mathcal A$ satisfy $\varphi$ with the assignment $s : Var \mapsto |\mathcal A|$ ?
It is :
for some $a \in |\mathcal A|$, we have $\mathcal A \vDash \varphi[s(x|a)]$.
Thus, if we consider an assignment $s$, we have that $\mathcal A \vDash (Qx \rightarrow ∀xQx)[s(x|a)]$ [because $\forall xQx$ is false precisely because $Q$ does not hold for $a$, and so we have : $False \rightarrow False$, which is $True$ ].
But, having shown that :
for some $a \in |\mathcal A|$, we have $\mathcal A \vDash (Qx \rightarrow ∀xQx)[s(x|a)]$
we may conclude with :
$\mathcal A \vDash \exists x (Qx \rightarrow ∀xQx)[s]$.
But this holds for $s$ and $\mathcal A$ whatever; thus :
$\vDash \exists x (Qx \rightarrow ∀xQx)$.
Comment
A further "informal" argument is the following.
By tautological equivalence, we may rewrite : $\exists x (Qx \rightarrow ∀xQx)$ as :
$\exists x (\lnot Qx \lor ∀xQx)$.
$\exists$ "works" as a "generalized" disjunction; thus, we can "distribute" it over $\lor$, obtaining the equivalent formula :
$\exists x \lnot Qx \lor ∀xQx$,
due to the fact that $\exists x \forall xQx$ has the same meaning of $\forall xQx$, $x$ being already bound.
But $\exists x \lnot Qx \lor ∀xQx$ is clearly valid; it means that either all objects are $Q$ or there is some object which is not, and this must hold in all universes.