Let $\mathcal{I}[X]$ denote the subring of $\mathbb{Q}[X]$ consisting of all integer-valued polynomials (i.e., $f(X)\in \mathbb{Q}[X]$ such that $f(k)\in\mathbb{Z}$ for all $k\in\mathbb{Z}$). For $f(X)\in\mathcal{I}[X]$ and a nonempty subset $S$ of $\mathbb{Z}$, write $\gamma_S(f)$ for the gcd of all $f(k)$ for $k\in S$. It is well known that each $f(X)\in\mathcal{I}[X]$ takes the form $f(X)=\sum_{i=0}^n\,A_i\,\binom{X}{i}$ for some $n\in\mathbb{N}_0$ and $A_0,A_1,\ldots,A_n\in\mathbb{Z}$ (that is, $\mathcal{I}[X]$ is a free abelian group with a $\mathbb{Z}$-basis consisting of $\binom{X}{i}$ for $i=0,1,2,\ldots$), so we set the modified content $\tilde{C}(f)$ of $f(X)$ to be $\gcd\left(A_0,A_1,\ldots,A_n\right)$.
Here are some examples (also stated in the link below) with $S=\mathbb{Z}$. For the polynomial $X^2+X=0\binom{X}{0}+2\binom{X}{1}+2\binom{X}{2}$, the modified content is $\gcd(0,2,2)=2$, which equals the gcd of all $k^2+k$ with $k\in\mathbb{Z}$. For the second one, $X^3-X=0\binom{X}{0}+0\binom{X}{1}+6\binom{x}{2}+6\binom{X}{3}$ so that the modified content is $\gcd(0,0,6,6)=6$, which is also the gcd of all $k^3-k$ with $k\in\mathbb{Z}$.
The question is: what are all nonempty subsets $S$ of $\mathbb{Z}$ such that $\gamma_S(f)=\tilde{C}(f)$ for all $f(X)\in\mathcal{I}[X]$? I know that $S$ must satisfy this condition: for every prime $p\in\mathbb{N}$, integer $r>0$, and $j\in\left\{0,1,2,\ldots,p^r-1\right\}$, there exists $s\in S$ such that $s\equiv j\pmod{p^r}$. Do we have anything similar if we replace $\mathbb{Z}$ by a GCD domain $D$ and $\mathbb{Q}$ by the field of fractions $F$ of $D$ (whence $\mathcal{I}[X]$ by the subring $\mathcal{I}_D[X]$ of $F[X]$ of D-valued polynomials, namely, $f(X)\in F[X]$ such that $f(k)\in D$ for all $k\in D$)? What if we increase the number of variables, that is, asking the same question about the gcd of a $D$-valued polynomial in $F\left[X_1,X_2,\ldots,X_l\right]$ over a subset $S\subseteq D^l$ and its modified content (if it is possible to define the modified content over $D$), where $l>1$ is an integer? See also here.
For example, we take $D:=\mathbb{R}[T]$ (so that $F=\mathbb{R}(T)$). Then, $\mathcal{I}_D[X]$ is precisely $D[X]=\mathbb{R}[T,X]$. For $f(X)\in D[X]$, we have $f(X)=\sum_{i=0}^n\,A_i(T)\,X^i$ for some $n\in\mathbb{N}_0$ and $A_i(T)\in \mathbb{R}[T]$, with $i=0,1,2,\ldots,n$, from which we define $\tilde{C}(f)$ to be $\gcd\left(A_i(T)\right)_{i=0}^n$. Already when $S$ is an infinite subset of $\mathbb{R}\subseteq \mathbb{R}[T]=D$ do we have $\gamma_S=\tilde{C}$.
When $D:=\mathbb{Z}$ and $f(X)\in\mathcal{I}[X]$, then write $f(X)=\sum_{i=0}^n\,A_i\,\binom{X}{i}$ with $A_0,A_1,\ldots,A_n\in\mathbb{Z}$. Then, it can be easily seen that $\gamma_S(f)=\tilde{C}(f)$ for $S:=\big\{i\in\{0,1,2,\ldots,n\}\,|\,A_i\neq 0\big\}$.
P.S.
(1) In fact, we can also define $\gamma_\emptyset(f)$ to be $0$ for all $f(X)\in\mathcal{I}[X]$ (or for a $D$-valued polynomial $f(X)\in \mathcal{I}_D[X]\subseteq F[X]$). For the zero polynomial $0$, we can set $\gamma_S(0)=0$ and $\tilde{C}(0)=0$.
(2) I may also need to assume that $D$ is a unique factorization domain, or even a principal ideal domain. I'm not sure if an infinite subset of a GCD domain necessarily has a gcd.