If you want long archivability characteristics then you should stick to regular B&W film. XP2 is chromogenic film which uses dyes during development to produce the image. These dyes do fade out with time. There was a research that I read once about color negative films life and I believe (not sure though) it was red dye who start fading first, I can't find this article right now.
But for 20-50 years (short period relatively) the chromogenic will serve you, however you must know that it's better to process it using C41 based on Ilford recommendations. The Blex step in C41 is important to process the dyes and fix at the same time, this bleach step is missing from the conventional B&W processing.
Can the processing affect its life-span?
Absolutely, and that goes for each film. Short fixing for B&W negs will make them less stable and certainly not archivable.
So To summarize, if you want max archivability then stick to regular B&W negatives (print then on FB paper if you want). If you still want to use Xp2 then do C41.
Check Ilford publication for more info
PS: you can mix conventional B&W film developers with C41, just switch the developer soup in C41 with what you want and experiment. However you must do the C41 bleach to process the dyes.