Distribution relation in the Euler system of Heegner points
What I don't understand is why the exactly the same terms should appear in both sums.
The Galois action on CM points is described in adelic terms via the fundamental theorem of complex multiplication (or Shimura's explicit reciprocity law) so identifying the terms appearing in the right-hand side of the equality $$\sum_{\sigma\in\mathrm{Gal}(K_{nl}/K_n)}\sigma x_{nl} = T_l x_n$$ boils down to describing the Galois group $\operatorname{Gal}(K_{n\ell}/K_n)$ in these terms, and this in turn is possible because $K_{n\ell}$ and $K_n$ are ring-class fields.
Specifically, there exist open compact subgroups $Z_{n},Z_{n\ell}$ of $\widehat{\mathcal O}_K^\times$ containing $\widehat{\mathbb Z}^\times$ such that $$\operatorname{Gal}(K_{?}/K)\simeq \widehat{K}^\times/K^\times\widehat{\mathbb Q}^\times Z_{?}$$ for $?=n,n\ell$ and in which $\widehat{A}$ denotes $A\otimes_{\mathbb Z}\widehat{\mathbb Z}$ for a $\mathbb Z$-module $A$. This implies that $\operatorname{Gal}(K_{n\ell}/K_{n})$ is very closely related to $Z_{n}/Z_{n\ell}$ (in general, there might be a small kernel to the surjective map $Z_{n}/Z_{n\ell}\rightarrow\operatorname{Gal}(K_{n\ell}/K_{n})$ corresponding to units in $\mathcal O_{K}$) so it remains to describe the quotient $Z_{n}/Z_{n\ell}$.
The payoff of having worked adelically is now that you can analyze this quotient place by place and locally at all places except $\ell$, it will be trivial by construction. At $\ell$, you are considering the quotient of the multiplicative group of an order in a quadratic unramified extension $E$ of $\mathbb Q_{\ell}$ by the multiplicative group of a maximal order. Because $E$ embeds in $M_2(\mathbb Q_{\ell})$, you can realize these multiplicative subgroups of orders as compact subgroups of $\operatorname{GL}_{2}(\mathbb Q_{\ell})$.
Now I think I have done as much as I could without explicitly calculating, so the remaining part has to involve a calculation, which amounts to the fact that conjugating $$\begin{pmatrix}a&b\\c&d\end{pmatrix}\textrm{ by }g=\begin{pmatrix}\ell&0\\0&1\end{pmatrix}$$ yields $$\begin{pmatrix}a&b/\ell\\c\ell&d\end{pmatrix}.$$ It follows that the subgroups $Z_{?}$ localized at $\ell$ can respectively be identified with the unit group of a maximal order $R$ in $M_{2}(\mathbb Q_{\ell})$ (which can be taken to be $M_2(\mathbb Z_{\ell})$) and the unit group of the order $R\cap g^{-1}Rg$. You should already recognize these as the groups appearing in the definition of the Hecke operator $T(\ell)$ defined adelically but to be complete, we finally find that $Z_{n}/Z_{n\ell}$ is $$\frac{(\mathcal O_K/\ell\mathcal O_K)^\times}{(\mathbb Z/\ell\mathbb Z)^{\times}}$$ and so is $\mathrm{Gal}(K_{nl}/K_n)$ (up to a small group of units in general). In particular, the orbit of $x_{n\ell}$ under this Galois group is of cardinal $(\ell^2-1)/(\ell-1)=\ell+1$. The formal sum of points in this orbit is included in the divisor equal to $T(\ell)\cdot x_n$ by definition of $T(\ell)$ (a Hecke operator is the sum over all points on some modular curve mapping to a point on a modular curve below it and all points in the orbit do so) and the cardinality of the orbit and of the set of points in the definition of the Hecke operator are the same so these sets are equal.
The moral of this story is that quotient of multiplicative group of orders in quadratic unramified extensions of local fields, which describe Galois groups of extensions between ring-class fields, can be described in terms of quotients of multiplicative group of orders by their conjugates in $M_2(E)$, and so are closely linked to Hecke operators. Note also that if what I have written above is correct, and I think it is, then the equality you wanted to understand might not be actually strictly true for all the $\ell$ you considered (because units in $\mathcal O_K$ might introduce a slight discrepancy between the orbit under the Galois group and the formal sum defining the Hecke operator for some small $\ell$). This explains the appearance of the hypothesis $D\neq -1,-3$ in some articles on Heegner points.
Thank you Olivier for this great answer, I wish I could be one of your students ;-) !
Though I still not quite fully understand the adelic setting, here is some "classical" explanation I found, using the theory of ideals in orders of imaginary quadratic fields. I guess this is supposed to be a very well-known result but, since I haven't found any complete proof of it, I'll write down what I hope to be a detailed one in case some people are interested. My main reference is D.A. Cox 's "Primes of the form $x^2+ny^2$", chapters 7 and 8.
First, slightly modify the notations and set for any $f\in\mathbb{Z}$:
- $I_K(f)$: group of ideals of $\mathcal{O}_K$ which are prime to $f$ (i.e., whose norm is prime to $f$)
- $P_{K,\mathbb{Z}}(f)$: subgroup of $I_K(f)$ made of principal ideals of the form $\alpha\mathcal{O}_K$, with $\alpha$ congruent to some $a$ mod $f\mathcal{O}_K$, with $a\in\mathbb{Z}$ and $(a,f)=1$.
Here the ideals are meant to be integral ideals, and the group structure is obtained by identifying $\mathfrak{a}$ and $\mathfrak{b}$ iff there are some $\alpha$, $\beta\in \mathcal{O}_K$ such that $\alpha\mathfrak{a}=\beta\mathfrak{b}$.
The quotient $I_K(f)/P_{K,\mathbb{Z}}(f)$ is what we call a generalized ideal class group, isomorphic to $Pic(\mathcal{O}_f)\simeq \mathrm{Gal}(K_f/K)$ ($K_f/K $ is the ring class field of conductor $f$, the isomorphism being defined by sending any prime-to-$f$ prime ideal of $\mathcal{O}_K$ to its Frobenius element). Here we set $Pic(\mathcal{O}_f)$ to be the group formed by the quotient of proper ideals of $\mathcal{O}_f $ (i.e., ideals $\mathfrak{a}\subset \mathcal{O}_f$ such that $End(\mathfrak{a})=\mathcal{O}_f)$, by principal ideals. An important fact is that any (proper or not) $\mathcal{O}_f$-ideal is a free $\mathbb{Z}$-module of rank $2$.
The isomorphism between $I_K(f)/P_{K,\mathbb{Z}}(f)$ and $Pic(\mathcal{O}_f)$ is given by sending $$\mathcal{O}_K\supset\mathfrak{a} \mapsto \mathfrak{a}\cap\mathcal{O}_f$$
One checks that elements of $P_{K,\mathbb{Z}}(f)$, of the form $\alpha\mathcal{O}_K$ are sent to $\alpha\mathcal{O}_f $ (this follows from $(a,f)=1$, with $a$ "the" integer congruent to $\alpha$ mod $f\mathcal{O}_K$.) The inverse isomorphism is given by sending $$\mathcal{O}_f\supset\mathfrak{a}\mapsto \mathfrak{a}\mathcal{O}_K$$ (see Cox's 7.18, 7.20).
Though it's not strictly necessary, I mention that the norm is preserved by these maps. The case$ f=1$ gives us the Hilbert class field $K_1 $ of $K$, such that $I_K/P_K=Pic(\mathcal{O}_K)\simeq \mathrm{Gal}(K_1/K)$. With these identifications, one obtains that the group $\mathrm{Gal}(K_f/K_1)$ corresponds to $I_K(f)\cap P_K/P_{K,\mathbb{Z}}(f)$.
An important fact is that, if $\mathcal{O}_K^{\times}=\{\pm 1\}$, we have the following exact sequence: $$1\rightarrow (\mathbb{Z}/f\mathbb{Z})^{\times}\rightarrow (\mathcal{O}_K/f\mathcal{O}_K)^{\times}\rightarrow I_K(f)\cap P_K/P_{K,\mathbb{Z}}(f) \rightarrow 1$$ (see Cox, 7.27)
Applying this to $f=n$, $nl$, one gets that $$\mathrm{Gal}(K_{nl}/K_1)\simeq (\mathcal{O}_K/nl\mathcal{O}_K)^{\times}/(\mathbb{Z}/nl\mathbb{Z})^{\times}$$ $$\mathrm{Gal}(K_{n}/K_1)\simeq (\mathcal{O}_K/n\mathcal{O}_K)^{\times}/(\mathbb{Z}/n\mathbb{Z})^{\times}$$
Therefore $\mathrm{Gal}(K_{nl}/K_n)$ is isomorphic to $$\frac{(\mathcal{O}_K/nl\mathcal{O}_K)^{\times}/(\mathbb{Z}/nl\mathbb{Z})^{\times}}{(\mathcal{O}_K/n\mathcal{O}_K)^{\times}/(\mathbb{Z}/n\mathbb{Z})^{\times}} $$ $$\simeq (\mathcal{O}_K/l\mathcal{O}_K)^{\times}/(\mathbb{Z}/l\mathbb{Z})^{\times}$$ as $(n,l)=1$. This last group is isomorphic to $\mathbb{F}_{l^2}^{\times}/\mathbb{F}_{l}^{\times}$, for $l$ is inert in $K/\mathbb{Q}$, so has cardinal $l+1$.
Elements of the group $\mathrm{Gal}(K_{nl}/K_n)$ also corresponds to prime-to-$nl$ principal ideals of the form $\mathfrak{a}=\alpha\mathcal{O}_K$, with $\alpha$ congruent to $a\in\mathbb{Z}$ mod $n\mathcal{O}_K$, $(a,n)=1$. Notice that $\alpha\in\mathcal{O}_{nl}$ iff. it corresponds to the identity of $\mathrm{Gal}(K_{nl}/K_n)$. Denote by $\mathfrak{a}(\sigma)=\alpha(\sigma)\mathcal{O}_K$ such an ideal corresponding to $\sigma\in\mathrm{Gal}(K_{nl}/K_n)$, and set $\mathfrak{a}_{\sigma}:=\mathfrak{a}({\sigma})\cap\mathcal{O}_{nl}$ the corresponding proper ideal of $\mathcal{O}_{nl}$.
As a consequence, if $\sigma\in\mathrm{Gal}(K_{nl}/K_n)$, then $\mathfrak{a}(\sigma)\cap\mathcal{O}_n=\alpha(\sigma)\mathcal{O}_n$ is principal, thus $\mathfrak{a}_{\sigma}\subset\mathcal{O}_{nl}$ satisfies $$\alpha(\sigma)^{-1}\mathfrak{a}_{\sigma}\subset \mathcal{O}_n.$$ We have $$\frac{\mathcal{O}_n}{\alpha(\sigma)^{-1}\mathfrak{a}_{\sigma}}\xrightarrow{\sim}\frac{\mathfrak{a}(\sigma)\cap\mathcal{O}_n}{\mathfrak{a}_{\sigma}}\hookrightarrow \frac{\mathcal{O}_n}{\mathcal{O}_{nl}},$$ the first map being multiplication by $\alpha(\sigma)$. As $\frac{\mathcal{O}_n}{\mathcal{O}_{nl}}\simeq \mathbb{Z}/l\mathbb{Z}$ and as $\frac{\mathfrak{a}(\sigma)\cap\mathcal{O}_n}{\mathfrak{a}_{\sigma}}$ is non-trivial (if $\sigma$ is not trivial then $\alpha(\sigma$) belongs to $\mathfrak{a}(\sigma)\cap\mathcal{O}_n$ but not to $\mathcal{O}_{nl})$; if $ \sigma$ is trivial then one directly gets $\frac{\mathfrak{a}(\sigma)\cap\mathcal{O}_n}{\mathfrak{a}_{\sigma}}=\frac{\mathcal{O}_{n}}{\mathcal{O}_{nl}})$, this finally implies that $$\frac{\mathcal{O}_n}{\alpha(\sigma)^{-1}\mathfrak{a}_{\sigma}}\simeq \mathbb{Z}/l\mathbb{Z}$$
Combining this with the formula $$\mathrm{Tr}_{K_{nl}/K_n}(x_{nl})=\sum_{\sigma\in\mathrm{Gal}(K_{nl}/K_n)}[\mathbb{C}/\mathfrak{a}_{\sigma}^{-1}\rightarrow \mathbb{C}/\mathfrak{a}_{\sigma}^{-1}\mathcal{N}_{nl}^{-1}]$$ (see my first post), and the facts that 1- $End(\alpha(\sigma)^{-1}\mathfrak{a}_{\sigma})=End(\mathfrak{a}_{\sigma})=\mathcal{O}_{nl}$, 2- the isomorphism class of an elliptic curve $\mathbb{C}/\Lambda$ is invariant under $\Lambda\mapsto \alpha\Lambda$ and 3- if $\sigma\neq \sigma' $ then $ \mathfrak{a}_{\sigma}$ and $\mathfrak{a}_{\sigma'}$ define different elements in $Pic(\mathcal{O}_{nl})$, one gets that $\mathrm{Tr}_{K_{nl}/K_n}(x_{nl})$ is a sum of $l+1$ distinct elements of the form $$[\mathbb{C}/\mathfrak{b}\rightarrow \mathbb{C}/\mathfrak{b}(\mathcal{N_n}\cap End(\mathfrak{b}))^{-1}]$$ with $\mathfrak{b}\subset \mathcal{O}_n$ a sub-lattice of index $l$. This is precisely the equality $$\mathrm{Tr}_{K_{nl}/K_n}(x_{nl})=T_l(x_n)$$ which I was looking for.