Welcome to the site!
I would
Guess that you would be OK with a 20" shaft engine with that transom. Hopefully more knowledgable opinions than I will chime in.
What
would be a factor in your decision is the condition of your existing transom.
Is it original or rebuilt? What condition?
When I was engine shopping to hang on my original 20" transom, I knew that rebuilding and raising it to 25" was a futrure possibility. With this in mind, I acquired a 25" shaft engine and used a jack plate to properly mount it on a 20" transom. This setup worked great, but. . .sure enough, a 35 year old transom is living on borrowed time and the rebuild day could not be put off any longer. I rebuilt my transom to 25'" and happily the same power fit back on like a glove.
Hope this helps.
Good luck with your decision