Theory of oscillatory exchange in magnetic multilayers: effect of partial confinement and band mismatch