It seems to me that there are (at least) two universal properties which one might cite, because the polynomial ring construction is "functorial in both arguments".
To see this, first let $U\colon \mathbf{CRing}\to \mathbf{Set}$ be the forgetful functor. There's a functor $$\operatorname{Poly}\colon \mathbf{CRing}\times\mathbf{Set}\to(1_{\mathbf{Set}} \downarrow U)$$
(by $(1_{\mathbf{Set}} \downarrow U)$ I mean the comma category) defined by
$$
(K,X)\mapsto (X,\,X\xrightarrow{\iota_{K,X}} U(K[X]),\,K[X])$$
(where $\iota_{K,X}$ is a fixed embedding of $X$ into $K[X]$) for any (unital) commutative ring $K$ and any set $X$ and
$$
\left(K\xrightarrow{\varphi} L, X\xrightarrow{f} Y\right)\mapsto
\left(X\xrightarrow{f} Y,\,K[X]\xrightarrow{\operatorname{Poly}(\varphi,f)}L[Y]\right)
$$
for any ring homomorphism $\varphi$ and any function $f$ as above, where $\operatorname{Poly}(\varphi,f):K[X]\to L[Y]$ is the unique ring homomorphism from $K[X]$ to $L[Y]$ such that $\operatorname{Poly}(\varphi,f)(c) = \varphi(c)$ for $c\in K$ and $\operatorname{Poly}(\varphi,f)(\iota_{K,X}(x)) = \iota_{L,Y}(f(x))$ for $x\in X$. Note that for any such pair $(\varphi,f)$, the square
$\require{AMScd}$
\begin{CD}
X @>\iota_{K,X}>>U(K[X])\\
@VfVV @VV\operatorname{Poly}(\varphi,f)V\\
Y @>\iota_{L,Y}>>U(L[Y])\\
\end{CD}
commutes by definition, so $\operatorname{Poly}$ really is a functor into the comma category (preservation of composition and identity are easy to verify).
If we fix the ring $K$, we get a functor $K[\cdot]\colon\mathbf{Set}\to K\mathbf{Alg}$, left adjoint to the forgetful functor $K\mathbf{Alg}\to\mathbf{Set}$, as in the previous answers.
On the other hand, if we fix the set $X$, we get a functor $F\colon \mathbf{CRing}\to (X \downarrow U)$ given by
$$
K\mapsto (X\xrightarrow{\iota_{X,K}}U(K[X]), \, K[X])
$$
and
$$
\left(K\xrightarrow{\varphi}L\right)\mapsto \left(K[X]\xrightarrow{\tilde{\varphi}} L[X]\right),
$$
where $\tilde{\varphi}\colon K[X]\to L[X]$ is the unique ring homomorphism from $K[X]$ to $L[X]$ with $\tilde{\varphi}(c) = \varphi(c)$ for $c\in K$ and $\tilde{\varphi}(\iota_{K,X}(x)) = \iota_{L,X}(x)$.
The category $(X \downarrow U)$ has as objects distinguished mappings of $X$ into commutative rings, and as morphisms the ring homomorphisms which preserve the respective distinguished mappings of $X$; in a sense, $(X \downarrow U)$ is a precise way of generalizing the category of pointed rings to a category of rings with multiple distinguished elements. If I'm not mistaken, the functor $F$ is left adjoint to the forgetful functor $G$ from $( X \downarrow U)$ to $\mathbf{CRing}$, and $K\hookrightarrow K[X]$ is a universal arrow to the functor $G$.
In the case when $|X| = 1$, this turns into the statement that the functor $K\mapsto (K[x],x)$ is left-adjoint to the forgetful functor from pointed commutative rings to commutative rings, which aligns (pleasantly?) with the intuition that the adjoining an indeterminate $x$ to a ring is the most general way of picking a "distinguished element".