The topological equivalence of the set $S_M:=\{x\in F:\langle Mx,x\rangle=1\}$ and the unit sphere $S:=\{x\in F:\|x\|=1\}$ can be proved as follows.

The assumptions on $M$ and the spectral theorem (or just the equality $\langle Mx,x\rangle=\langle \sqrt{M}x,\sqrt{M}x\rangle$) imply that $\langle Mx,x\rangle>0$ for any non-zero vector $x\in F$. Then the map $$h:S\to S_M,\;h:x\mapsto \frac{x}{\sqrt{\langle Mx,x\rangle}},$$ is a homeomorphism with inverse $$h^{-1}:S_M\to S,\;\;h^{-1}:y\mapsto \frac{y}{\|y\|}.$$

**Acknowledgement.** I would like to thank Nik Weaver for his very helpful comments, which allowed to simplify the initial answer (which infolved a powerful machinery of infinite-dimensional topology) to the present (almost) trivial form.

**Added after comments of @MathUsers:** For a positive (but not necessarily injective) opeartor $M$ on a Hilbert space $F$ the set $S_M:=\{x\in F:\langle Mx,x\rangle=1\}$ is homeomorphic to the product of the sphere in a Hilbert space and a Hilbert space (of suitable dimensions). This can be shown as follows.

Using the Spectral Theorem, show that the Hilbert space $F$ admits an orthogonal projector $P:F\to Y$ onto its subspace $Y\subset F$ such that
$M=M\circ P=P\circ M$ and $\langle My,y\rangle>0$ for every $y\in Y\setminus\{0\}$. Write $F$ as the orthogonal sum $F=X\oplus Y$ where $X=P^{-1}(0)$ is the kernel of the projector $P$. Let $S_Y=\{y\in Y:\|y\|=1\}$ be the unit sphere in the Hilbert space $Y$.

**Theorem.** The space $S_M:=\{x\in F:\langle Mx,x\rangle=1\}$ is homeomorphic to $X\times S_Y$.

*Proof.* The map $$h:X\times S_Y\to S_M,\;\;h:(x,y)\mapsto x+\frac{y}{\sqrt{\langle My,y\rangle}}$$is a homeomorphism with the inverse $$h^{-1}:z\mapsto (z-Pz,\tfrac{Pz}{\|Pz\|}).$$

**Corollary.** The space $S_M$ is homeomorphic to the unit sphere $S$ in $F$ if and only if the positive opeartor $M$ has infinite-dimensional range.