The only one of those four United players who fits what Guardiola wants from his teams is Shaw.
Casemiro is defensively stronger than Rodri but a much worse passer.
Varane is not as comfortable on the ball as either Stones or Dias.
Rashford's technique is erratic, he's direct and not much of a passer. I don't think he's a worse player than Grealish in all circumstances but Grealish definitely fits Guardiola's City better.
Yeah it's also dependent on the teammates you have. Casemiro and Rodri are both world class, the 2 best on the world in their position. Rashford vs Grealish is entirely dependent on team. Last season, Rashford would have been far more useful for them. Now they have Haaland, so they don't need that guy to make those runs on behind and they would rather use Grealish or Sancho than Rashford.
Ignoring styles, systems, coaching etc, individual player quality I have it as:
- De Gea << Ederson
- Wan Bissaka/dalot = Walker
- Varane > Stones
- Martinez = Dias, but Martinez is out
- Shaw >> Ake
- Casemiro = Rodri
- Eriksen/Fred << Gundogan
- Bruno < De Bruyne
- Antony/Sancho << Mahrez
- Rashford = Grealish
- Martial <<< Haaland
Realistically if Pep could hand pick from both, he'd pick Martinez and Shaw and move Dias to RCB, and then the rest he'd probably keep as is.