Hey!
Why do you want your text box to be automatically resizeable? I've had this question asked a few times before, and I just want to know what the end goal is so I can help properly!
Additionally, there's a few values to mess around with... outside of Unity UI, you can use the "auto wrap" and "vertical limit" values in the same way as the UI rect bounds. It's also worth looking at the different "Vertical Limit Mode" options, since "Show Last" and "auto pause" are useful when trying to have a lot of text in one place like a dialogue box. (Although I've got a bug with pauses not working as expected at the moment, so I've got to fix that ASAP!)
There are also best fit options, but apart from the "multiline" option, they are intended for text that's either just one line or has manual line breaks. (STM does its automatic linebreak insertion after the size of the text is determined, so that's why this works this way)
But yeah, please let me know the goal you're trying to achieve! When I think of "vertical space auto-resizing" I just think of a text box trying to fit so much text that it becomes unreadable, but there may something I'm misunderstanding... Like trying to resize text per-platform? Please let me know what this is for when you can!