Page breaking is LaTeX's achilles heel¹. For better or for worse, it is capable of doing an awful job of page breaking.
So, you're going to need to do some manual adjustment to get the desired results. No matter how small you make the stretch on the theorem style, LaTeX will want to stretch something to get a flush bottom.
First off, for the love of all that his holy,² do not make \baselineskip stretchable.
Next off, what you need to do is to get a bit more text on the page that's affected. This means you're going to need to go through the whole document and look for places to adjust the page breaks. When I was publishing Serif back in the 90s, I was often looking for opportunities to lengthen or shorten page lengths to get the best page breaks (further complicated by the fact that it was a two column layout so I needed to have four perfect column breaks in a row). Figures or tables are a great place to add a little extra space (or trim the space a little) so that you can move a line backwards or forwards.
You can adjust an individual page's length using the command
\enlargethispage{\baselineskip}
to lengthen the page or
\enlargethispage{-\baselineskip}
to shorten the page.
You'll want to adjust facing pairs of pages by identical amounts to keep the bottom of the page from getting too long.
Longer paragraphs can sometimes be stretched out, as mentioned in the comments by adding
\looseness=±1
to the paragraph to tighten or stretch it by one line. I wouldn't expect good results on shorter paragraphs.
You've also indicated that you have forbidden widows and orphans in your document. You may find yourself needing to relax this prohibition to get better page breaks. Personally, I wouldn't allow a hyphenation across a page break, but I'd be ok with a widow line or a longer orphan if it can't be helped.
\mbox is helpful for eliminating bad hyphenations at page breaks.³ You may also find it helpful to change some end-of-paragraph spaces to ~ to keep a last line from getting too short at a page break.
With those measures in place, you can relax the widow and orphan rules by defining the following command:
\NewDocumentCommand{\okpar}{}
{{\widowpenalty=0 \clubpenalty=0 \par}}
and putting \okpar at the end of the paragraph that you want to allow widows and/or orphans.⁵
It's probably not a bad idea to wrap up any commands for \looseness in macros as well, although those, at least don't need the grouping trick that \okpar uses to restrict their effect to a single paragraph.
To be fair, I've not seen good automatic page breaking from anything. I recently had to give some specific guidance to the designer of a journal that published a story of mine to get good page breaks. The original page breaks were atrocious.
1 Cor 10:23.
In typical short-sighted mode, I often spent ages fiddling with adjusting page sizes for Serif instead of just writing \mbox{polysyllabic}⁴ in my document.
Actually \hbox since Serif was typeset with a custom format. Among other things, it enabled a simple mechanism to adjust page size on the fly. The hanging punctuation code, however, broke line breaks after – and — so I had to insert a manual penalty after each instance of -- and --- in my source code to allow line breaks there. I might have needed it after - as well—it's 20 years since I last looked at those files and the hard drive which they're on crashed.
Knuth's definition of widow is what I was taught was an orphan with his club being a widow.⁶,⁷
In Knuth's defense, googling this to verify what I remember being taught, I've found all sorts of conflicting definitions of widow and orphan in typographic terms.
Late addition Checking with Bringhurst's Elements of Typographic Style, Bringhurst has the orphan at the bottom of the page and the widow at the top of the page, so Knuth has one of the chief arbiters of typographic taste on his side on this one.
\parskip 1em plus 0.5em minus 0.2em? – Fran Jul 09 '21 at 16:12\loosenessapproach. The answer to this question discusses the problem: https://tex.stackexchange.com/q/523488 – barbara beeton Jul 09 '21 at 20:40\looseness, and I'll follow that up. – barbara beeton Jul 10 '21 at 02:11\parskip(with reasonable values is hardly noticed). Better to let LaTeX distribute the spaces as best it can in each possible occasion than force to LaTeX to break when there are no choice. – Fran Jul 10 '21 at 08:46