Well as far as I remember, the Airbus FMGC is clever enough to comply with altitude restrictions as entered, despite having a different setting on the altimeter. Don't know about Boeings, although I should!
Tried it yesterday and the 787 doesn't allow for different settings, so you need to have the correct setting when using VNAV until you've finished complying with any altitude restrictions.