Scale texts as the the parent shape layer changes
If you have the cube animation as a rendered file and can't mess around in the original animation, I would try corner-pins. Simply track the corners by hand by keyframing the four corners of the corner-pin to the corners of each face and apply it to your text layer. You might want to precomp the text first and apply the corner-pin onto the precomp, so you're able to rescale and modify the text alone from inside the precomp.