Thanks for both of your help. So I attempted to draw out both scenarios with arrow pushing, and this is what I came up with (please let me know if anything is wrong):
So, if I understand correctly, the pyrimidine ring is pi-deficient due to the two nitrogens having an electron withdrawing and deactivating effect, which is further compounded by the presence of the amine which would direct electrophilic aromatic substitution at the ortho- and para- positions. As you mentioned, the lone pairs are orthogonal to the aromatic electrons and thus cannot be donated, which is in contrast to the pyrazole...
The pyrazole, on the other hand, is pi-excessive and the N1 lone pair is involved in aromaticity. The succinimide anion then picks up the C-5 proton, regenerating aromaticity and forming the expected product.
Would it be oversimplification to state that C-5 is the expected product due to the pi-excessive nature of the pyrazole in contrast to the pi-deficiency of the pyrimidine?
Thanks again for your help.