Python 2, 82 \$\cdots\$78 77 bytes
Added 2 bytes to fix an error kindly pointed out by S.S. Anne.
Switched to Python 2 thanks to Grimmy.
Saved a byte thanks to @Arnauld!!!
f=lambda s,i=1:i*all((`i*i`+`i**3`).count(c)/s.count(c)for c in s)or f(s,i+1)