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 an orientable compact surface of non-positive Euler characteristic. (The case $\chi(M)>0$ is impossible, by the Gauss Bonnet Theorem.) 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\ge 0$.