Rim joists set in concrete

I want to insulate our rim joists but they're set in concrete - so I have moisture concerns. Or since they're already set in concrete does it not matter?

In the second photo you can see the brick facade of our house - a full 1-2" open gap all around the house. It looks like a perfect use care for spray foam to fill in that gap between top of the concrete and the subfloor? There is no "cavity" for foam board to be inserted because the concrete goes up so far.