This (which is a follow-up to Lifting a determinant map) must be standard, and yet I am failing to find a reference. Consider a map $f:\mathbb{R}^n \to M^{n\times n}.$ You can pick its degree of regularity to maximize your happiness, but the question is whether (and how) you can find a map $g: \mathbb{R}^n \to \mathbb{R}$ such that its Hessian is given by $f.$ Now, if one does it in steps: first find a function $h: \mathbb{R}^n \to \mathbb{R}^n$ of which $f$ is the Jacobian, and then find $f$ of which $h$ is the gradient, you get a debauche of integrability conditions, which seems hard to make sense of, but there must be a nice way to express it.
A related (and, I am guessing, easier) question is as above with $\mathbb{R}^n$ replaced by $\mathbb{C}P^n,$ matrices now being complex (if, instead of matrices, you would prefer your favorite algebraic group, that is of interest too), and the map should be a rational map.