[proofplan]
We construct the quotient by cutting out from the rational Hecke algebra the eigensystem attached to the normalized newform $f$. The annihilator ideal $I_f$ defines an abelian subvariety $I_fJ_0(N)$ of the modular Jacobian, and the quotient $A_f := J_0(N)/I_fJ_0(N)$ is the desired abelian variety over $\mathbb{Q}$. The key input is the standard Eichler-Shimura newform quotient theorem: for a normalized newform, this quotient is the simple isogeny factor attached to the Galois orbit of $f$, the induced Hecke action is faithful after tensoring with $\mathbb{Q}$, and the resulting rational Hecke algebra is $K_f$. This gives the embedding $K_f \hookrightarrow \operatorname{End}_{\mathbb{Q}}(A_f)\otimes_{\mathbb{Z}}\mathbb{Q}$ and uniqueness up to $\mathbb{Q}$-isogeny.
[/proofplan]
[step:Define the Hecke eigensystem and the quotient of the modular Jacobian]
Let $X_0(N)$ denote the smooth projective modular curve over $\mathbb{Q}$ classifying elliptic curves equipped with a cyclic subgroup of order $N$, and let
\begin{align*}
J_0(N) := \operatorname{Pic}^0(X_0(N))
\end{align*}
be its Jacobian abelian variety over $\mathbb{Q}$. Let $\mathbb{T} \subseteq \operatorname{End}_{\mathbb{Q}}(J_0(N))$ be the commutative Hecke algebra generated over $\mathbb{Z}$ by the Hecke correspondences $T_n$ for $n \geq 1$.
The normalized newform $f \in S_2(\Gamma_0(N))$ has Fourier expansion
\begin{align*}
f(q) = \sum_{n=1}^{\infty} a_n(f) q^n,
\end{align*}
with $a_1(f) = 1$, and the Hecke field is
\begin{align*}
K_f := \mathbb{Q}(a_n(f) : n \geq 1) \subseteq \mathbb{C}.
\end{align*}
Define the Hecke eigencharacter
\begin{align*}
\lambda_f: \mathbb{T} \otimes_{\mathbb{Z}} \mathbb{Q} &\to K_f \\
T_n &\mapsto a_n(f)
\end{align*}
and define its integral annihilator ideal by
\begin{align*}
I_f := \ker(\lambda_f) \cap \mathbb{T}.
\end{align*}
For an element $u \in I_f$, write $u:J_0(N) \to J_0(N)$ for the corresponding $\mathbb{Q}$-endomorphism. Define the abelian subvariety
\begin{align*}
I_fJ_0(N) := \sum_{u \in I_f} \operatorname{im}(u) \subseteq J_0(N),
\end{align*}
where the sum is the smallest abelian subvariety of $J_0(N)$ containing all images $\operatorname{im}(u)$. Since every $u \in I_f$ is defined over $\mathbb{Q}$, this subvariety is defined over $\mathbb{Q}$. Set
\begin{align*}
A_f := J_0(N)/I_fJ_0(N)
\end{align*}
and let
\begin{align*}
\pi_f:J_0(N) &\to A_f
\end{align*}
be the quotient morphism. This gives an abelian variety $A_f/\mathbb{Q}$ and a surjective morphism from $J_0(N)$.
[/step]
[step:Descend the Hecke action to the quotient through the eigenvalues of $f$]
Because $\mathbb{T}$ is commutative, the subvariety $I_fJ_0(N)$ is stable under every $T_n$. Hence each $T_n$ descends uniquely to an endomorphism of $A_f$, denoted
\begin{align*}
T_{n,A_f}:A_f &\to A_f,
\end{align*}
characterized by
\begin{align*}
T_{n,A_f} \circ \pi_f = \pi_f \circ T_n.
\end{align*}
Thus $\pi_f$ is Hecke-stable.
The quotient action of $\mathbb{T}$ on $A_f$ factors through $\mathbb{T}/I_f$. Define
\begin{align*}
\operatorname{End}_{\mathbb{Q}}^0(A_f) := \operatorname{End}_{\mathbb{Q}}(A_f) \otimes_{\mathbb{Z}} \mathbb{Q}.
\end{align*}
We now invoke the standard Eichler-Shimura newform quotient theorem for normalized newforms of level $N$: for the quotient $A_f = J_0(N)/I_fJ_0(N)$, the induced rational Hecke action
\begin{align*}
(\mathbb{T}/I_f) \otimes_{\mathbb{Z}} \mathbb{Q} &\to \operatorname{End}_{\mathbb{Q}}^0(A_f)
\end{align*}
is injective, and the homomorphism induced by $\lambda_f$ identifies
\begin{align*}
(\mathbb{T}/I_f) \otimes_{\mathbb{Z}} \mathbb{Q}
\end{align*}
with the Hecke field $K_f = \mathbb{Q}(a_n(f):n\geq 1)$. Hence the composite embedding
\begin{align*}
K_f &\hookrightarrow \operatorname{End}_{\mathbb{Q}}^0(A_f)
\end{align*}
sends $a_n(f)$ to the rational endomorphism class of $T_{n,A_f}$ for every $n \geq 1$. This is precisely the asserted $K_f$-linear sense in which $T_n$ acts on $A_f$ through $a_n(f)$.
[guided]
The quotient was chosen so that all Hecke operators annihilating the eigenform $f$ become zero on $A_f$. More explicitly, $I_f$ consists of exactly those integral Hecke operators whose eigenvalue on $f$ is zero under the character $\lambda_f$. Since the Hecke algebra is commutative, if $u \in I_f$ and $T_n \in \mathbb{T}$, then
\begin{align*}
T_n(\operatorname{im}(u)) = \operatorname{im}(T_nu) = \operatorname{im}(uT_n) \subseteq I_fJ_0(N).
\end{align*}
Thus $I_fJ_0(N)$ is stable under $T_n$, so $T_n$ descends to a unique endomorphism $T_{n,A_f}:A_f \to A_f$ satisfying
\begin{align*}
T_{n,A_f} \circ \pi_f = \pi_f \circ T_n.
\end{align*}
Now the descended action kills $I_f$, so it factors through the quotient algebra $\mathbb{T}/I_f$. Define the rational endomorphism algebra
\begin{align*}
\operatorname{End}_{\mathbb{Q}}^0(A_f) := \operatorname{End}_{\mathbb{Q}}(A_f) \otimes_{\mathbb{Z}} \mathbb{Q}.
\end{align*}
Factoring through $\mathbb{T}/I_f$ alone would not prove that $K_f$ embeds in $\operatorname{End}_{\mathbb{Q}}^0(A_f)$; it would only give a possibly non-faithful action. This is exactly where the newform hypothesis is used. The standard Eichler-Shimura newform quotient theorem says that, for a normalized newform, the rational Hecke action on the quotient $A_f = J_0(N)/I_fJ_0(N)$ is faithful after passing to
\begin{align*}
(\mathbb{T}/I_f) \otimes_{\mathbb{Z}} \mathbb{Q}.
\end{align*}
The same theorem identifies this rational quotient algebra with
\begin{align*}
\operatorname{im}(\lambda_f) = K_f = \mathbb{Q}(a_n(f):n\geq 1).
\end{align*}
Under this identification, the class of $T_n$ corresponds to $a_n(f)$. Hence the rational endomorphism induced by $T_n$ on $A_f$ is exactly multiplication by $a_n(f)$ through the embedded copy of $K_f$ in $\operatorname{End}_{\mathbb{Q}}^0(A_f)$.
[/guided]
[/step]
[step:Apply the newform quotient theorem to prove uniqueness up to isogeny]
We use the following standard consequence of Eichler-Shimura theory and multiplicity one for normalized newforms. The rational Hecke algebra $\mathbb{T}\otimes_{\mathbb{Z}}\mathbb{Q}$ acts semisimply on $J_0(N)$ up to $\mathbb{Q}$-isogeny, and the normalized newform $f$ determines a unique simple isogeny factor $A(f)$ whose rational Hecke algebra is identified with $K_f$ by $T_n \mapsto a_n(f)$. Equivalently, in the isogeny category of abelian varieties over $\mathbb{Q}$, every Hecke-stable quotient of $J_0(N)$ on which the Hecke action has eigensystem $\lambda_f$ is isogenous to this factor.
The quotient constructed above has kernel containing exactly the abelian subvariety generated by the images of operators in $I_f$, so the same theorem identifies $A_f$ with $A(f)$ in the $\mathbb{Q}$-isogeny category. If $B/\mathbb{Q}$ is another abelian variety admitting a Hecke-stable quotient
\begin{align*}
\rho:J_0(N) &\to B
\end{align*}
with the same Hecke eigensystem $\lambda_f$, then the quoted newform quotient theorem identifies $B$ with the same simple isogeny factor $A(f)$. Therefore $A_f$ and $B$ are both isogenous over $\mathbb{Q}$ to $A(f)$, and hence are isogenous to each other over $\mathbb{Q}$.
[guided]
The uniqueness statement is not uniqueness as a literal quotient with a chosen kernel. It is uniqueness in the isogeny category of abelian varieties over $\mathbb{Q}$, where two abelian varieties are identified when there is a $\mathbb{Q}$-isogeny between them.
The input needed here is the standard Eichler-Shimura newform quotient theorem together with multiplicity one for normalized newforms. Applied to the normalized newform $f \in S_2(\Gamma_0(N))$, it gives a simple isogeny factor $A(f)$ of $J_0(N)$ over $\mathbb{Q}$ with the following two properties. First, the rational Hecke action on $A(f)$ identifies the rational Hecke quotient attached to $f$ with
\begin{align*}
K_f = \mathbb{Q}(a_n(f):n\geq 1).
\end{align*}
Second, any Hecke-stable quotient of $J_0(N)$ on which $T_n$ acts through $a_n(f)$ for every $n\geq 1$ represents this same simple factor in the $\mathbb{Q}$-isogeny category.
Our constructed quotient $\pi_f:J_0(N)\to A_f$ is Hecke-stable and has the eigensystem $\lambda_f$ by the preceding step, so the theorem identifies $A_f$ with $A(f)$ up to $\mathbb{Q}$-isogeny. Now let $B/\mathbb{Q}$ be another abelian variety admitting a Hecke-stable quotient
\begin{align*}
\rho:J_0(N) &\to B
\end{align*}
with the same Hecke eigensystem $\lambda_f$. The same theorem applies to $B$, because its Hecke action has the same eigenvalues $a_n(f)$ and therefore the same character $\lambda_f$. Hence $B$ is also $\mathbb{Q}$-isogenous to $A(f)$. Since both $A_f$ and $B$ are $\mathbb{Q}$-isogenous to the same simple newform factor $A(f)$, they are $\mathbb{Q}$-isogenous to each other. This proves uniqueness up to $\mathbb{Q}$-isogeny.
[/guided]
[/step]
[step:Collect the construction and verify the theorem statement]
The construction gives an abelian variety $A_f/\mathbb{Q}$ and a quotient morphism $\pi_f:J_0(N) \to A_f$. The quotient is Hecke-stable because every $T_n$ preserves $I_fJ_0(N)$. By the faithful-action part of the standard Eichler-Shimura newform quotient theorem, the induced rational Hecke action gives an embedding
\begin{align*}
K_f \cong (\mathbb{T}/I_f) \otimes_{\mathbb{Z}} \mathbb{Q} \hookrightarrow \operatorname{End}_{\mathbb{Q}}(A_f) \otimes_{\mathbb{Z}} \mathbb{Q},
\end{align*}
and the operator $T_n$ acts through the eigenvalue $a_n(f)$ for every $n \geq 1$. By the uniqueness part of the same newform quotient theorem, any other quotient with these properties is $\mathbb{Q}$-isogenous to $A_f$. This proves existence, Hecke compatibility, the $K_f$-endomorphism inclusion, and uniqueness up to isogeny.
[/step]