If the inner product of two real functions is defined as:
$$\langle f,g \rangle = \int_{-\infty}^{\infty} f(x)\cdot g(x) \ \text{d}x$$
Given
$$\langle f,g \rangle=\langle f,1\rangle$$
What does it say about $g$? Can I express $\langle f,g^2\rangle$ in terms of $\langle f,g\rangle$ and $g(x)$?
I guess here $\langle f,g\rangle=\bar{g}$ if $f$ is a PDF and $g=g(f)$, but $\langle f,g \rangle=\langle f,1\rangle$ is a stronger condition than that.
I think you cannot get much, and I think the answer to your question about $\langle f, g^2 \rangle $ is also no. Here is something to consider:
Let $w$ be any $L^2$ function that is not orthogonal to $f \neq 0$. Let $k = \langle f, w \rangle / \langle f, 1 \rangle$. Let $g = \frac{w}{ k}$. Then,
$$\langle f, g\rangle = \frac{\langle f, 1 \rangle}{\langle f, w\rangle} \langle f, w\rangle = \langle f, 1\rangle$$
So the identity holds but all you can say about $g$ is that it is not orthogonal to $f$. It is (nearly) an arbitrary function. If you consider your question about $g^2$,
$$\langle f, g^2 \rangle = \left(\frac{\langle f, 1 \rangle}{\langle f, w\rangle}\right)^2 <f, w^2>$$
Which is pretty hopeless for arbitrary $w$!