I have found an explicit construction in terms of the (higher) Johnson homomorphism. Briefly put, the third Johnson homomorphism is an $\mbox{Sp}_{2g}(\mathbb{Z})$-equivariant map
$$
\tau_3: K_g \to M
$$
for some $\mbox{Sp}_{2g}(\mathbb{Z})$-module $M$ which can be shown to be isomorphic to $\mbox{Sym}^2(V(2))$ (here we adopt the standard notation for representations of $\mbox{Sp}$). There is a contraction mapping $\mbox{Sym}^2(V(2)) \to \mathbb{C}$, furnishing the required invariant homomorphism.
In case anyone is interested, I will sketch the construction. In the setting where the surface has a boundary component, there's more known about the image of the third Johnson homomorphism. Indeed, Morita shows that
$$
\tau_3:H_1(K_{g,1}; \mathbb{Q}) \to \mbox{Sym}^2(\wedge^2H)
$$
is a surjection. Here $H:= H_1(\Sigma_{g,1};\mathbb{Q})$. We'll work for now over $\mathbb{Q}$. In light of the decomposition $\wedge^2 H = V(2) \oplus V(0)$ into irreps of $\mbox{Sp}_{2g}(\mathbb{Z})$, the target $\mbox{Sym}^2(\wedge^2 H)$ decomposes as
$$
\mbox{Sym}^2(\wedge^2 H) = \mbox{Sym}^2(V(2)) \oplus V(2) \oplus V(0).
$$
Explicitly, $V(0)$ is spanned by $\omega^2$, where $\omega \in \wedge^2 H$ is the symplectic form.
There is a short exact sequence
$$
1 \to N \to K_{g,1} \to K_g \to 1,
$$
and hence the Johnson homomorphism on $K_g$ is valued in $\mbox{Sym}^2(\wedge^2 H) / (\tau_3(N))$. The goal now is to identify the image of $N$. This will be done in two steps, reflecting the fact that there is a short exact sequence
$$
1 \to \mathbb{Z} \to N \to \pi_1(\Sigma_g)^{[2]} \to 1,
$$
where the notation $G^{[k]}$ indicates the $k^{th}$ term in the lower central series of a group $G$, taking $G^{[1]} = G$. The kernel $\mathbb{Z}$ is generated by the twist about the boundary component $T_\Delta$, and $\pi_1(\Sigma_g)^{[2]}$ is viewed as a subgroup of $K_{g,*}$ via the Birman exact sequence (here $K_{g,*}$ is the Johnson kernel for a surface with one puncture).
In the paper mentioned above, Morita shows that
$$
\tau_3(T_\Delta) = \omega^2.
$$
This implies that there is a well-defined homomorphism
$$
\tau_3: H_1(K_{g,*}; \mathbb{Q}) \to \mbox{Sym}^2(V(2)) \oplus V(2).
$$
The next step is to identify the image of $\pi_1(\Sigma_g)^{[2]}$ under $\tau_3$. In fact, the image is $V(2)$. This is because the restriction of $\tau_3$ to $\pi_1(\Sigma_g)^{[2]}$ factors through $\pi_1(\Sigma_g)^{[2]} / \pi_1(\Sigma_g)^{[3]}$, and
$$
\pi_1(\Sigma_g)^{[2]} / \pi_1(\Sigma_g)^{[3]} \otimes \mathbb{Q} \cong V(2).
$$
In summary, we have identified the (rational) image of the third Johnson homomorphism on the closed Johnson kernel:
$$
\tau_3: K_g \to \mbox{Sym}^2(V(2)).
$$
Now we simply observe that there is the contraction $C: \mbox{Sym}^2(V(2)) \to \mathbb{Q}$. Thus $C \circ \tau_3$ is the required invariant homomorphism.
Morita, Shigeyuki, Casson’s invariant for homology 3-spheres and characteristic classes of surface bundles. I, Topology 28, No.3, 305-323 (1989). ZBL0684.57008.