This is a question in which I've been interested for almost ten years! I don't want to get too much into detail about my motivation, but you can get an idea if you check:
M. Giudici, S .P. Glasby, C. H. Li and G. Verret, Arc-transitive digraphs with quasiprimitive local actions, J. Pure Appl. Algebra 223 (2019) 1217–1226.
The question there is a bit more general, your question is the restriction when both permutation groups are regular (and so we can just think of them as abstract groups). This restriction is considered at the end of Section 3, see Corollary 3.5 for example. I think this is a very natural question, and I know a little bit about it, but I wish I knew more!
To be explicit, I am assuming that (finite) $H_1$ and $H_2$ are given, and we want to know if there exists a finite $G$ having isomorphic normal subgroups $N_1$ and $N_2$, such that $G/N_i\cong H_i$. I will say that $H_1$ and $H_2$ are compatible in this case.
As Eric Wofsey pointed out, a necessary condition is that $H_1$ and $H_2$ have the same composition factors. One can improve this and prove that $H_1$ and $H_2$ must have a composition series with the same factors appearing in the same order. (The proof is quite nice and short, as a hint, consider a minimal witness $G$.)
So, for example, $A_4$, the alternating group of degree $4$, is not compatible with the dihedral group of order $12$, even though they have the same multiset of composition factors.
Note that compatibility is not an equivalence relation. For example, $\mathrm{SL}(2,5)$ and $S_5$ are not compatible (for the reason above) but they are both compatible to $A_5\times C_2$ (see Example 3.6 in the paper above).
I know many constructions to show that certain groups are compatible. But I am not able to show that the above necessary condition is not sufficient, although I do believe it is not sufficient.
As a final small taste, the smallest pair of which I cannot determine the status is $A_4$ and $C_{12}$. I believe they are not compatible, but cannot prove it. (I asked about it once on the Group Pub Forum, which did not resolve the issue.)