Here are explicit examples when $M$ is compact, connected, and $\chi(M)\le0$. *Orientable case:* 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 Riemann 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$ (and vanishes there to order $2g{-}1$), defines a flat metric on $M\setminus\{p\}$. *Non-orientable case:* 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} $$ 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)\}\in M$ 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$. By the classification of surfaces, the above two cases cover all of the compact, connected surfaces $M$ with $\chi(M)\le 0$. *Nonexistence when $\chi(M)>0$:* In this case, there cannot be a smooth $(0,2)$-form $h$ on $M$ that vanishes only at one point and elsewhere defines a flat metric. This will follow from the Gauss-Bonnet Theorem. First, a local fact: If $h$ is a smooth $(0,2)$-form on a (not necessarily compact) surface $M$ that degenerates at a single point $p$ but defines a (positive definite) 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 except possibly at $p$, satisfies $\zeta(p)=0$, and satisfies $h = L^2|\zeta|^{2(L-1)}|\mathrm{d}\zeta|^2$ on $B\setminus\{p\}$ for some constant $L>0$. (This uses the fact that $h$ near $p$ can be bounded above by an actual smooth metric.) Now, suppost that $M$ is compact and let $D\subset B$ be the disk on which $|\zeta|<\epsilon$ for some small $\epsilon>0$. Apply the Gauss-Bonnet Theorem 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, Gauss-Bonnet yields $$ -2\pi L = \int_{\partial C} \kappa_g\,\mathrm{ds} = 2\pi\chi(C) = 2\pi(\chi(M)-1), $$ so $\chi(M) = 1-L < 1$. Thus, $\chi(M)\le 0$ and $L$ is positive integer. (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.) *Smoothing conical flat metrics:* It is known that, if $M$ is a compact, connected surface and $L_1,\ldots,L_m$ are positive real numbers such that $L_1+\cdots+L_m = m-\chi(M)$, then there exists a conformal structure on $M$ and $m$ points $p_1,\ldots,p_m$ and a flat Riemannian metric $h$ on $M\setminus\{p_1,\ldots,p_m\}$ such that each $p_i$ has a $p_i$-centered conformal coordinate chart $\zeta_i:B_i\to\mathbb{C}$ with the property that $h = (L_i)^2|\zeta_i|^{2(L_i-1)}|\mathrm{d}\zeta_i|^2$ on $B_i\setminus\{p_i\}$. This $h$ will not extend smoothly in the $\zeta_i$ coordinate to $\zeta_i=0$ (i.e., $p_i$) unless $L$ is a (positive) integer. However, defining a new (non-conformal) coordinate $z_i = |\zeta_i|^{(L_i-2)/2}\zeta_i$ on $B_i$, one finds that $$ (L_i)^2|\zeta_i|^{2(L_i-1)}|\mathrm{d}\zeta_i|^2 = (L_i)^2 |z_i|^2|\mathrm{d}z_i|^2 + \bigl(1-(L_i)^2/4)\bigr)\bigl(\mathrm{d}(|z_i|^2)\bigr)^2. $$ Thus, in the $z_i$ coordinate, $h$ is smooth at $z_i=0$ (i.e., $p_i$). Using the $z_i$ to build a smooth (in fact, real-analytic) atlas on $M$ (keeping the conformal atlas at all the points of $M$ other than the $p_i$) yields a new smooth structure on $M$ in which $h$ extends real-analytically to all of $M$ and vanishes to order 2 at each of the $p_i$.