In fact, here's an explicit example with $\chi(M)\not=0$: Let $M$ be the 1-point compactification of the hyperelliptic Riemann surface defined in the affine plane $\mathbb{C}^2$ by $$ y^2 = x^{2g+1}-1. $$ This is a smooth Reimann surface of genus $g\ge1$ and hence $\chi(M) = 2-2g$. The holomorphic $1$-form $$ \omega = \frac{dx}{y} = \frac{dx}{\sqrt{x^{2g+1}-1}} $$ has only one zero (at the point $p$ where $x$ and $y$ have poles of order $2$ and $2g{+}1$ respectively). Consequently, the smooth $(0,2)$-tensor $$ h = \omega\circ\overline{\omega}, $$ which vanishes only at $p$, defines a flat metric on $M\setminus\{p\}$. **Added Remark:** The above covers the case of a connected, orientable compact surface of non-positive Euler characteristic. (The case $\chi(M)>0$ is impossible, by the Gauss Bonnet Theorem, see below.) For the unorientable surfaces of non-positive Euler characteristic, a similar argument to the above works: Consider the Riemann surface $\tilde M$ that is the $2$-point compactification of the complex affine curve without real points $$ x^{2g+2} + y^2 + 1 = 0, $$ where $g\ge 1$. This is a (hyperelliptic) Riemann surface of genus $g$ and hence $\chi(\tilde M) = 2-2g$. The holomorphic $1$-form $$ \omega = \frac{\mathrm{d}x}{y} $$ now has two zeroes, one at each of the two points where $x$ and $y$ have poles (of order $1$ and $g{+}1$, respectively), and hence $\omega$ has a zero of order $g{-}1$ at each of these points. The antiholomorphic involution $C(x,y)=(\bar x,\bar y)$ has no fixed points and pulls $\omega$ back to $\overline{\omega}$. Hence, the smooth quadratic form $\omega\circ\overline{\omega}$ is invariant under $C$ and thus descends to the quotient $M$ consisting of the pairs $\{q,C(q)\}$ for $q\in \tilde M$. This $(0,2)$-form on $M$ vanishes at the point $\{p,C(p)\}$ where $p\in \tilde M$ is (either) pole of $x$ and nowhere else. Away from the point where it vanishes, it defines a flat metric on $M$. Meanwhile, $M$ is a compact nonorientable surface of Euler characteristic $\chi(M) = 1-g\le 0$. **About the positive Euler characteristic case:** If $h$ is a smooth $(0,2)$-form on $M$ that vanishes at a single point $p$ and defines a metric with Gauss curvature $0$ everywhere else, then one can show that $p$ has an open neighborhood $B\subset M$ on which there exists a complex coordinate chart $\zeta:B\to\mathbb{C}$ that is smooth away from $p$, satisfies $\zeta(p)=0$, and satisfies $h = L^2|\zeta|^{2(L-1)}|\mathrm{d}\zeta|^2$ on $B$ for some constant $L\ge1$. (The fact that $h$ near $p$ can be bounded above by an actual smooth metric is what implies $L\ge1$.) Now let $D\subset B$ be the disk on which $|\zeta|<\epsilon$ for some small $\epsilon>0$, and apply Gauss Bonnet to the compact surface $C = M\setminus D$, which has the circle $|zeta|=\epsilon$ as boundary and satisfies $\chi(C) = \chi(M)-1$. Since the Gauss curvature of $h$ on $C$ is zero, using Gauss-Bonnet one finds $$ -2\pi L = \int_{\partial C} \kappa_g\,\mathrm{ds} = 2\pi\chi(C) = 2\pi(\chi(M)-1), $$ so $\chi(M) = 1-L \le 0$. (This works even when the surface $C$ is non-orientable, using the 'unoriented' version of Gauss-Bonnet. Alternatively, one could pass to the orientation double cover if necessary and argue there. The result is the same.)