I assume that, in the surface case, the OP wants to interpret $S$ as a surface endowed with a Riemannian metric and wants to understand the solutions to the equations $\Delta f - hf^2 = 0$ and $|\nabla f|^2 + hf^3 = 0$ for a given constant $h$.
Clearly, if $h=0$, the only solutions are to have $f$ be constant, so one can assume that $h\not=0$. Then, setting $u = -hf$, the above equations are equivalent to $\Delta u + u^2 = 0$ and $|\nabla u|^2 - u^3 = 0$, so it suffices to solve these latter equations.
Let $g$ be the metric on $S$ and assume that $u$ is a nonzero (and, hence, necessarily positive) solution to the above equations on a simply-connected open subset $S'\subset S$. The second equation implies that $\omega_1 = u^{-3/2}\,\mathrm{d}u$ is a $1$-form with $g$-norm $1$ on $S'$, and hence $g$ can be written in the form $g = {\omega_1}^2 + {\omega_2}^2$ on $S'$ for some $\omega_2$, which is also a unit 1-form.
Fix an orientation by requiring that $\omega_1\wedge\omega_2$ be the $g$-area form on $S'$. Then $\star \mathrm{d}u = u^{3/2}\,\omega_2$, and since $\mathrm{d}(\star \mathrm{d}u) = \Delta u\, \omega_1\wedge\omega_2$, it follows that
$$
\tfrac32\,u^{1/2}\mathrm{d}u\wedge\omega_2 + u^{3/2}\,\mathrm{d}\omega_2
=\mathrm{d}(u^{3/2}\,\omega_2) = -u^2\,\omega_1\wedge\omega_2 = -u^{1/2}\,\mathrm{d}u\wedge\omega_2\,,
$$
or
$$
\mathrm{d}\omega_2 = -\tfrac52\,u^{-1}\,\mathrm{d}u\wedge\omega_2\,,
$$
which can be written in the form
$$
\mathrm{d}\bigl(u^{5/2}\,\omega_2\bigr) = 0.
$$
Since $S'$ is simply connected, it follows that there exists a function $v$ on $S'$ such that $u^{5/2}\,\omega_2 = \mathrm{d}v$. Consequently, the metric $g$ has the form
$$
g = {\omega_1}^2 + {\omega_2}^2 = u^{-3}\,\mathrm{d}u^2 + u^{-5}\,\mathrm{d}v^2.
$$
This metric can be placed in 'polar form' by setting $u = 4r^{-2}$ and $v = 32\theta$, in which case, it becomes
$$
g = \mathrm{d}r^2 + r^{10}\,\mathrm{d}\theta^2,
$$
This is a singular, incomplete metric at $r=0$ (where $u$ goes to $\infty$), though it is complete at $r=\infty$. Its Gauss curvature is $K = -(r^5)''/r^5 = -20 r^{-2} = -5u < 0$.
The original $f$ then takes the form $f = -u/h = -4/(hr^2)$.
Thus, up to isometry, there is essentially only one solution to the OP's original problem. (In particular, as Igor showed in his answer, there is no nonconstant solution when the background metric $g$ is flat.) The modified problem (with the additional constant $c$) can be solved using essentially the same techniques.