Let $f$ denote a polynomial mod $p$ and associate to it its value set $S_{f} := \{f(x):x \in F_p\}$.

If $|S_{f}|=p$ then $f$ is called a permutation polynomial (because it permutes the elements of $F_p$). Obviously, affine transformations (degree 1 polynomials) are permutation polynomials, but there are less trivial examples as well, and there is a substantial literature on these.

It is a theorem of Wan that if $f$ is not a permutation polynomial then $|S_f| \leq (1-d^{-1})p + 1/d$ where $d$ is the degree of $f$. Put differently, if $f$ is not a permutation polynomial it misses a constant fraction of the elements of $F_p$.

I'd like to understand to what extent does $S_f$ determines $f$. The existence of non-trivial permutation polynomials is one impediment here. For instance if, $\rho$ is a permutation polynomial then $S_f =S_g$ for $g= f \circ \rho$ or $g = \rho \circ f$. Of course the degree of $f$ and $g$ will now differ unless $\rho$ is an affine transformation. But one could also take a two distinct permutation polynomials of the same degree $\rho_1$ and $\rho_2$ and any polynomial $h$ and form $f= \rho_1 \circ h$ and $g = \rho_2 \circ h$, and get two distinct polynomials of the same degree with the same value set.

I'd like to understand if all examples of polynomials with the same degree come from permutation polynomials.

To pose a concrete question:

Let $f$ and $g$ be degree $d$ indecomposable* polynomials which are not permutation polynomials on $F_p$ and $S_f = S_g$. To avoid possible degeneracies further assume that $p$ is sufficiently large compared to $d$. Does this imply that there is an affine map $\rho$ such that $g= f \circ \rho$ or $g = \rho \circ f$?

I'd be interested in any positive results along the lines of what I am asking.

*By indecomposable I mean that $f$ can't be written of the composition of lower degree polynomials at least one of which is degree greater than $1$.