Does Gorensteinness of $\mathbb{T}_{\mathfrak{m}}$ imply multiplicity one? Let $N$ be a prime and let $\mathbb{T} \subset \mathrm{End}(J_0(N))$ be the Hecke algebra generated over $\mathbb{Z}$ by $U_N$ and the operators $T_p$ for primes $p \nmid N$. Fix a maximal ideal $\mathfrak{m} \subset \mathbb{T}$ and let $\mathbb{T}_{\mathfrak{m}}$ be the completion of $\mathbb{T}$ at $\mathfrak{m}$.
In the paper "Modular curves and the Eisenstein ideal" Mazur proves (Lemma II.15.1) that "multiplicity one" at $\mathfrak{m}$, i.e., $\mathrm{dim}_{\mathbb{T}/\mathfrak{m}}(J_0(N)[\mathfrak{m}](\overline{\mathbb{Q}})) = 2$, implies that the ring $\mathbb{T}_{\mathfrak{m}}$ is Gorenstein. Are there known examples where the converse implication fails, i.e., where $\mathbb{T}_{\mathfrak{m}}$ is Gorenstein but $\mathrm{dim}_{\mathbb{T}/\mathfrak{m}}(J_0(N)[\mathfrak{m}](\overline{\mathbb{Q}})) \neq 2$? (Or does the converse perhaps hold?) What about the analogous question in the case when $N$ is not necessarily prime (but, say, $\mathfrak{m}$ is "new")?
 A: In the ordinary case, the argument is simple so let me recall it here.
The $p$-divisible group $J$ is an extension of an étale $p$-divisible group $J^{et}$ by a multiplicative $p$-divisible group $J^{m}$ and the Pontryagin dual $J^{et*}$ of $J^{et}$ is a free $\mathbb T_\mathfrak{m}$-module of rank 1 by the ordinarity assumption. Assume in addition that $\mathbb T_\mathfrak{m}$ is a Gorenstein ring. Then $\operatorname{Hom}(\mathbb T_\mathfrak{m},\mathbb Z_{p})/\mathfrak{m}\operatorname{Hom}(\mathbb T_\mathfrak{m},\mathbb Z_{p})$ is a $\mathbb T_\mathfrak{m}/\mathfrak{m}\mathbb T_\mathfrak{m}$-vector space of dimension 1 (here we use the fact that a ring $R$ is a Gorenstein ring if and only if its dualizing complex is concentrated in degree 0 and isomorphic to $R$).Then $J^{et}[\mathfrak m]$ is free of rank 1, by duality so is $J^{m*}[\mathfrak m]$ and finally $J[\mathfrak m]$ is a free $\mathbb T_\mathfrak{m}$-module of rank 2.
Note that this does not require the fact that $\bar{\rho}_{\mathfrak m}$ is absolutely irreducible.
If $T_p$ belongs to $\mathfrak m$, the argument is more involved but Proposition (14.2) of Modular curves and the Eisenstein Ideal asserts that $J[\mathfrak m]$ is always of dimension 2 in that case (even without assuming $\mathbb T_\mathfrak{m}$ to be Gorenstein).
So the question of the title definitely admits the answer yes and conversely for the question in the body of the text.
