Well, this may not be the optimum method to do this. Still you can rotate video 90 degree counterclockwise, apply the text and rotate video 90 degree clockwise. These steps will result you the vertical text on the video.
You can use transpose or rotate to rotate the video clockwise and anticlockwise. Rotating videos with ffmpeg question has a good set of explanations regarding this.
To add text to a video you can use drawtext filter. Document it self has a good explanation and set of examples which you can followup.
By using these two functions you can apply the text vertically. Following command will work for you.
ffmpeg -i input_video -filter_complex "
[0:v]transpose=2[anticlockwiserotated];
[anticlockwiserotated]drawtext=fontfile=font.ttf: text='Test Text':x=100: y=50: fontsize=36: fontcolor=white:[textapplied];
[textapplied]transpose=1" output_video
Here you need to use filter_complex which will apply the required filters and chain them accordingly. [0:v] refers to the first input source which is the video. Instead of font.ttf you have to use the absolute path to the font source.
Hope this helps!