How large gas motor on flat stern canoe?

I have never gone above 5hp. Most of the time if I find a stamp on a canoe they say up to 5hp. I know that’s not all boats but at least has been my experience.

A 17 foot canoe with a 36 inch beam is a typical size for a paddling canoe.
Yours just happens to have a transom.
It is very easy to capsize such a canoe when it is loaded. You and the engine put a lot of weight aft.
Forget about 20 mph. A more reasonable speed would be about 6-8 mph, much like a drift boat with a small outboard.
A 3.5 hp is a good size, because they are light and will get you some speed. under 40 pounds.
The 4-6 hp engines have the same block with different carbs. they weight around 60 pounds.
An 8 hp engine weighs around 90 pounds.

Now that electric trolling motors are available with up to 86 or more of thrust and you only need about 2 lbs for every 100 lbs of boat, a 40 or 50 lb thrust model would be about double what you need figuring on 1,000 lbs of boat and gear. With a lighter load you could easily get over 10 mph.

Lighter load won’t be enough. Trolling motor props are pitched for low speed and high torque. You might be able to replace the prop with something faster.

And marine batteries weigh 60 lbs and up. Personally I’d go with a 3.5 hp outboard, maybe 30 lbs including the gas.

How far are you going to get on an overnight trip with a battery powered motor?
You could bring solar panels.