Each axis is fine using a different stepper size and/or quality. You will still need to tune their operating current and steps/mm for each of course. Make sure your motor mounts fit too.
Where it might become challenging is if you wanted two different steppers on the SAME axis. As in, a NEMA17 + NEMA23 for a dual Z axis. I don't think this is what you intend though.