Neither replaced Cuadrado, Demiral replaced Danilo's role and Chiesa swutched his flank in his same role. The one that replaced Cuadrado was Alex Sandro.
Pirlo plays the asymmetric 442/3412, one of the fullbacks stays back as a hybrid CB (Danilo) while the other pushes up much more as midfielder (Cuadrado) but still folds back into the backline of 4 in defense. Chiesa was NOT playing this role, he was defending the second line of 4 with the midfielders, its the exact same role he always plays but switched sides.
He switched sides because Pirlo change the side of the the attacking fullback. Instead of Cuadrado on the right, it was Alex Sandro on the left. So the RB must stay as a defensive RB/CB, this was Demiral, not Chiesa obviously, usually Danilo's role.
In attack
X - X
X
Chiesa - X - X - Cuadrado
Danilo - Bonucci - De Ligt
In defense
X - X
Chiesa - X - X - X
Danilo - Bonucci - De Ligt - Cuadrado
Or today in attack
X - X
X
Sandro - X - X - Chiesa
De Ligt - Bonucci - Demiral
In defense
X - X
X - X - X - Chiesa
Sandro - De Ligt - Bonucci - Demiral
Chiesa always plays as a winger, which is good, he should be used a fullback like the others. He is clearly better on the right as well.