Let $X$ be a spectral topological space, $U\subset X$ be a quasi-compact open subspace. Is there necessarily some scheme structure on $X$ (we do not require it to be affine) such that $U$ endowed with the restriction of the structure sheaf is an affine scheme?

I think I can answer this for $U=X$ (a spectral space is the underlying space of an affine scheme; depending on your definitions, that is either trivial or a theorem of Hochster).

no scheme structureon $X$ (affine or non-affine), whose restriction to $U$ would define an affine scheme structure? $\endgroup$ – user138661 May 18 at 5:18