Here's a counterexample with an $\aleph_1$-generated $\sigma$-algebra on the target space. This is really a fact about any set of cardinality $\aleph_1$, but to make notation a bit easier we work with $X = Y = \omega_1 \times \{0,1\}$ (where as usual $\omega_1$ is the first uncountable ordinal). On both sides we use the measure that assigns measure $0$ to countable sets and measure $1$ to cocountable sets (and those are the only sorts of sets we'll end up measuring). We start by equipping $Y$ with the countable/cocountable $\sigma$-algebra on $\omega_1 \times \{0,1\}$, and we equip $X$ with the somewhat coarser $\sigma$-algebra $\mathcal{M}$ consisting of sets of the form $A \times \{0,1\}$, where $A \subseteq \omega_1$ is countable or cocountable. Finally, our function $f$ is the identity.
Certainly we have condition 1, since the completion of $\mathcal{M}$ with respect to the measure is the entire countable/cocountable $\sigma$-algebra. On the other hand, we don't have condition 2. Towards a contradiction, suppose there is some $\mathcal{M}$-measurable function $g$ agreeing with the identity off of a null (thus countable) set $C \subseteq \omega_1 \times \{0,1\}$. Choose $\alpha \in \omega_1$ such that $(\alpha, 0)$ is not in $C \cup g(C)$. Then the singleton $S=\{(\alpha,0)\}$ is measurable in $Y$, but $g^{-1}(S) = \{(\alpha,0)\}$ is not $\mathcal{M}$-measurable, a contradiction.
Let us first show that if $f_n \to f$ everywhere, then $f$ is also measurable, if $Y$ is a metric space. The proof is more or less literally taken from Serge Lang's "Real and Functional Analysis". A different (shorter) proof is given in Dudley's book "Real Analysis and Probability", Theorem 4.2.2.
First, let $U \subset Y$ be open. For each $x \in f^{-1}(U)$, we have $f_n (x) \to f(x) \in U$ and thus $f_n (x) \in U$, i.e. $x \in f_n^{-1}(U)$ for all sufficiently large $n \geq n_x$. This proves
$$
f^{-1}(U) \subset \bigcap_{m=1}^\infty \bigcup_{k=m}^\infty f_k^{-1}(U). \qquad (\dagger)
$$
Now, let $A \subset Y$ be closed. If
$$
x \in \bigcap_{m=1}^\infty \bigcup_{k=m}^\infty f_k^{-1}(A),
$$
then for each $m$ arbitrarily large, there is some $k \geq m$ with $f_k (x) \in A$. This implies that there is some subsequence $(f_{k_\ell})$ with $f_{k_\ell} (x) \in A$ for all $\ell$. But $f_{k_\ell} (x) \to f(x)$. Since $A$ is closed, this yields $f(x) \in A$, i.e. $x \in f^{-1}(A)$. Hence,
$$
\bigcap_{m=1}^\infty \bigcup_{k=m}^\infty f_k^{-1}(A) \subset f^{-1}(A). \qquad (\ddagger)
$$
Now, let $U \subset Y$ be open and define
\begin{eqnarray*}
A_n &:=& \{y \in Y \mid {\rm dist}(y, U^c) \geq 1/n\},\\
U_n &:=& \{y \in Y \mid {\rm dist}(y, U^c) > 1/n\}.
\end{eqnarray*}
Since the ${\rm dist}$ function is continuous, we see that $U_n$ is open and $A_n$ is closed with $U_n \subset A_n \subset U$ and $\bigcup_n U_n = \bigcup_n A_n = U$. Here, the equality to $U$ uses the fact that $U$ is open.
Using $(\ddagger)$, we see
$$
f^{-1}(U) = \bigcup_n f^{-1}(U) \supset \bigcup_n \bigcap_{m=1}^\infty \bigcup_{k=m}^\infty f_k^{-1}(A_n) \supset \bigcup_n \bigcap_{m=1}^\infty \bigcup_{k=m}^\infty f_k^{-1}(U_n).
$$
Conversely, $(\dagger)$ implies
$$
f^{-1}(U) = \bigcup_n f^{-1}(U_n) \subset \bigcup_n \bigcap_m \bigcup_{k=m}^\infty f_k^{-1}(U_n).
$$
All in all, we get equality. Since the right-hand side is a measurable set, $f^{-1}(U)$ is measurable. This shows that $f$ is measurable.
Now, if $X$ is a complete measure space and if $f = g$ a.e. with $g$ measurable, then $f$ is also measurable. To see this, let $N \subset X$ be of measure zero with $f = g$ on $N^c$. Now, if $U \subset Y$ is open, then
$$
f^{-1}(U) = [g^{-1}(U) \cap N^c] \cup [f^{-1}(U) \cap N],
$$
where $[g^{-1}(U) \cap N^c]$ is measurable because $g$ is and $[f^{-1}(U) \cap N]$ is measurable as a subset of a null-set, because the measure space is assumed complete.
Thus, if the convergence is only true almost everywhere, i.e. on $N^c$, where $N \subset X$ is of measure zero, then $g_n := f_n \cdot \chi_{N^c}$ is measurable with $g_n \to f \cdot \chi_{N^c}$ pointwise. Hence, $f \cdot \chi_{N^c}$ is measurable. But $f = f \cdot \chi_{N^c}$ on $N^c$, i.e. almost everywhere. Hence, $f$ is measurable.
Finally, we show that the statement is false in general if $Y$ is not a metric space. This counterexample is taken from Dudley's book, Proposition 4.2.3.
We take $Y = I^I$, where $I =[0,1]$ is the unit interval. We equip $I$ with the usual product topology and we define
$$
f_n : I \to I^I, x\mapsto (y\mapsto \max \{0, 1- n|x-y|\}).
$$
Since $I$ is first countable, $f_n$ is continuous if we can show that $x_k \to x \in I$ implies $f_n(x_k) \to f_n(x)$. But this simply means $f_n(x_k)(y) \to f_n (x)(y)$ for all $y \in I$, which is easy to see.
Now define
$$
f : I \to I^I, x \mapsto (y \mapsto \chi_\Delta (x,y)),
$$
where $\Delta = \{(x,x) \in I\times I \mid x\in I\}$.
It is easy to see $f_n (x)(y) \to f(x)(y)$ for all $x,y\in I$. But this means $f_n(x) \to f(x)$ for all $x \in I$.
Now, let $E \subset I$ be an arbitrary subset (potentially nonmeasurable) and let
$$
W := \{g \in I^I \mid \exists y\in E : g(y) > 1/2 \} = \bigcup_{y \in E} {g \in I^I \mid g(y)>1/2}.
$$
Then $W \subset I^I$ is open, but $f^{-1}(W) = E$. If we take $E$ to be nonmeasurable (w.r.t. the Lebesgue $\sigma$-algebra), this shows that $f$ is not Lebesgue-measurable, although all $f_n$ are continuous and hence measurable.
Best Answer
Given I understand you correctly (topologize almost everywhere convergence), we can show that this is not possible. If we have a topological space, then we have convergence of a sequence if and only if every subsequence has a further convergent subsequence and so on.
So pick a sequence that converges in measure but not almost everywhere. There is a theorem that states that every subsequence of this also converges in the same measure. So it has a subsequence that converges almost everywhere (by another theorem). But the original sequence does not converge almost everywhere so we cannot have convergence in a topology.
Should I add more detail?