I'd be real careful of this, i.e. make sure that you get the cant just right--if you *really* have to do this.
Alpine bootfitters mess with some kind of canting/ramping all the time and correct our stance for our oddly angled physiology. But the biomechanics of alpine skiing move in many planes.
Classic XC is different.
Most XC coaches will advise against under-binding canting shims at all costs, suggesting instead orthotics or over-the-counter insoles (Superfeet, or whatever). Parents ask about shimming all the time when they don't want to shell out $$$ for orthotics or custom footbeds for their growing teenager's feet. (They'll happily spend $2K for 6 pairs of Fischers each season for their kid, $500 for the Salomon boots-du-jour, $600 for poles, but not $250 for orthotics....go fig)
Do what you can do for pronation/supination (and a lot can be done) but keep the boot sole as flat as possible, assuming your technique is otherwise correct. Unless your issues are such that you have cobblers angle your street shoe's soles in addition to orthotics/inserts... If this is not the case, you would create new stresses that your ankles, knees, and hips wouldn't be used to. Over time, the pain will creep up.
BUt if you have your insole needs dialed in, and your technique is spot on, then the shims are the next thing to do, i.e. the last resort. No, they don't affect flex.
When you ski out of tracks, as Newf describes, it'll strain you no matter what.
EDIT: A lot of young racers think they'll get a little extra bite from their skate skis with angled shims (the ones who think this are getting lazy in their V1). But whenever they say that, it's time to have them stretch more and revisit proper weight transfer and knee alignment.