The answer is positive (for both the smooth and continuous cases). First let's show that $f$ is in fact a function of the coefficients of the characteristic polynomial. Let $A$ be a matrix, say in real Jordan normal form, so $A$ is block diagonal with blocks of the form
$$J_\lambda = \begin{pmatrix} \lambda & 1 & & & \\ & \lambda & 1 & & \\ & & \ddots & & \\& & & \lambda & 1 \\ & & & & \lambda \end{pmatrix} \qquad \text{or} \qquad K_{a, b} = \begin{pmatrix} C & I & & & \\ & C & I & & \\ & & \ddots & & \\& & & C & I \\ & & & & C \end{pmatrix}$$
where
$$C = \begin{pmatrix} a & b \\ -b & a \end{pmatrix}.$$ We'll show that $f(A) = f(D(A))$, where $D(A)$ is the "diagonal" of $A$, where each $J_\lambda$ of $A$ is replaced by a diagonal matrix with all $\lambda$'s, and each $K_{a, b}$ is replaced by a block diagonal matrix with all blocks $(\begin{smallmatrix} a & b \\ -b & a \end{smallmatrix})$.
Let
$$J_\lambda(\varepsilon) = \begin{pmatrix} \lambda & \varepsilon & & & \\ & \lambda & \varepsilon & & \\ & & \ddots & & \\& & & \lambda & \varepsilon \\ & & & & \lambda \end{pmatrix}$$ so $J_\lambda(1) = J_\lambda$ is the standard Jordan block, and $J_\lambda(0) = D(J_\lambda)$ is diagonal. Note that for $\varepsilon > 0$, $J_\lambda(\varepsilon)$ is conjugate to $J_\lambda$ via a diagonal matrix, and $J_\lambda(\varepsilon) \to J_\lambda(0)$ as $\varepsilon \to 0$. We can similarly define matrices $K_{a, b}(\varepsilon)$ with $K_{a, b}(\varepsilon)$ conjugate to $K_{a, b}$ for $\varepsilon > 0$ and such that $K_{a, b}(\varepsilon) \to K_{a, b}(0) = D(K_{a, b})$ as $\varepsilon \to 0$.
Putting blocks together, we have a family of matrices $A(\varepsilon)$ such that $A(\varepsilon)$ is conjugate to $A$ for $\varepsilon > 0$, and such that $A(\varepsilon) \to D(A)$ as $\varepsilon \to 0$. Since $f$ is conjugation-invariant, $f(A(\varepsilon)) = f(A)$ for $\varepsilon > 0$, so taking $\varepsilon$ to $0$, continuity of $f$ gives $f(D(A)) = f(A)$.
Now note that $D(A)$ is determined entirely by the characteristic polynomial of $A$: it has a block $(\lambda)$ for each real root $\lambda$ (counting multiplicity) and a block $(\begin{smallmatrix} a & b \\ -b & a \end{smallmatrix})$ for each conjugate pair of complex roots $a\pm bi$. In particular, $A$ and $D(A)$ have the same characteristic polynomial. Thus $f(A)$ is a function of (the coefficients of) the characteristic polynomial of $A$, so we can write $f(A) = H(P_1(A), \dots, P_n(A))$ for some $H : \mathbb{R}^n \to \mathbb{R}$.
To show continuity (smoothness) of $H$, consider the affine map $T : \mathbb{R}^n \to M_n(\mathbb{R})$ taking $(P_1, \dots, P_n)$ to the companion matrix
$$\begin{pmatrix} & & & & -P_n \\ 1 & & & & -P_{n-1} \\ & 1 & & & -P_{n-2} \\ & & \ddots & & \vdots \\ & & & 1 & -P_1 \end{pmatrix}$$
This has characteristic polynomial $x^n + P_1x^{n-1} + \cdots + P_n$, hence
$$f(T(P_1, \dots, P_n)) = H(P_1, \dots, P_n)$$
i.e. $H = f \circ T$. Since $f$ is continuous, $H$ is continuous, and if $f$ is smooth, $H$ is smooth.