Rooting for Trees With the Right Nodes
Haskell, 120 bytes



_#0=1
i#j=div(i#(j-1)*(i+j-1))j
s!n|let(0?1)0=1;(0?_)_=0;(m?n)c=sum[s!m#j*((m-1)?(n-j*m)$c-j)|j&lt;-[0..c]]=sum$(n-1)?n&lt;$&gt;s


Try it online!

How it works

i#j is i multichoose j.

(m?n)c is the number of n-node trees with c children at the root, each of which has a subtree of at most m nodes.  It’s computed by summation over j, the number of these subtrees that have exactly m nodes.

s!n is the number of n-node trees.  It’s computed by summation over c ∈ s, the number of children at the root.