Both Moses and Paul expressed the desire that they be 'cursed' (blotted out of God's book or cut off from Christ) for the sake of others (Israel). Cf. Ex 32:32; Roms 9:3.
Clearly both believe that in some sense the 'anathema' of the one substitutes for the many. They are not saying they wish to be 'cursed' alongside Israel but 'cursed' instead of Israel. If possible, they could wish to be 'accursed' in the place of the nation.
They were not so cursed, nor, for them was curse-bearing possible. Yet, the curse would be borne by one fitted to bear it. Paul is clear, Jesus took the curse.
Gal 3:13 Christ redeemed us from the curse of the law by becoming a curse for us-for it is written, "Cursed is everyone who is hanged on a tree"
His curse bearing is not simply alongside Israel but instead of Israel, bearing the curse to redeem those cursed, in order that they be no longer cursed.
Surely this is substitutionary atonement. Praise God for the curse-bearer.