Alternate answer: In Adobe Illustrator, you could use envelope distort and leave the text fully editable:
The red trapezoid is on top - with a multiply transparency blend mode to make visibility easier: with the text and the trapezoid both selected, go to Menu>Object>Envelope Distort>Make with Top Object - like so:
This gives us this result, which looks a ...
One a fast answer could be "apply perspective!". But that's not the same. Horizontal dimensions have stayed intact, the stretching is vertical. Perspective affects all dimensions.
In Illustrator you can get the right result with Effect > Distort & Transform > Free Distort:
In the Free Distort dialog simply drag the right side corners vertically.
Select T to add a text
Rasterize the text by right click on the layer > Rasterize
go to Photoshop menu bar > Window > Liquefy and with the first option on the top left corner selected, adjust the size of the brush and the pressure