Ceiling rim joist insulation on kitchen bump-out

I currently have half of my kitchen ceiling removed to sister up joists of a sagging floor. My kitchen is a bump out in a two-story home. The attic of the bump-out is unvented, inaccessible, and likely uninsulated (this is a problem I plan to deal with when reroofing in the next few years.).
I’d like to take this opportunity to air seal the rim joists that are exposed (unfortunately only about half the rim joist area in my kitchen) and want to do it in such a way that doesn’t create a condensation risk. Currently, I just have fiber glass bats in the joist bays.
I was planning to add 1.5-2″ of rigid foam sealed with canned spray foam, but worry that this combined with batt insulation in the bays could lead to condensation. Additionally, someday I might add rigid exterior insulation and worry I could create a rim joist “foam sandwich” that can’t try in either direction. Is it safe to have air sealed rigid foam on both sides of the rim joist? If not, what are some alternatives? Air seal seams and penetrations with canned foam/caulk and just put batts up there?
Thanks.
A few pics are attached for reference. The kitchen fan penetration can be used to orient interior vs exterior.
GBA Detail Library
A collection of one thousand construction details organized by climate and house part


Replies
I should add that I am in zone 5A in a generally very leaky 1940s home.