I am building an ebike on a road frame. I am using a Bafang G310 rear hub motor & 8 Speed Shimano cassette. I plan to use a long MTB rear 8 spd derailleur (either Acera or Alivio). For my crankset I have been considering the 105 Shimano FC 5700 Crankset OR the SHIMANO 2018 FC-5800 105 172.5 50/34 11-SPD BLK CT CRANKS. Can these be compatible with an 8 speed cassette? My frame is a Gosforth 931. Is there a set for 2x8 spd flat bar shifters that is compatible with both the rear mtb derailleur and 105s?
is an 11 speed 105 crank/chainrings going to work if everything else is 8 speed?
Yes that should work fine. Bicycle chain has a fairly consistent inner width, its the outer width that varies between 7+8/9/10/11/12 chain. 7 and 8 speed chain is the same width.
If you're using an 11 speed Front Derailleur then the cage could be quite tight for 8 speed chain, so using the 8 speed FD should fit better or you could spread the cage with leverage.
Are there shifters that will work?
Sure - the rear shifter only depends on the cassette spacing and not its width. Since you have a MTB rear derailleur, you want an 8 speed shifter which could be indexed pod/trigger shifter, or a non-indexed friction shifter.
There is no need to have identical shifters either. You can mix and match whatever you like.
As for the front shifter, you'd want a double that supports the 11 speed chainring spacing. This might be different to the 8 speed spacing on the front.
So the dirty hack for front shifting is a friction shifter. It may not be as pretty as a pod shifter, but you can adjust both position and trim while riding.
I've had an ebike, and it was quite heavy. Don't discount a triple on the front if you ever ride up significant hills.
Your choice of 8 speed rear is good - there are a lot of parts readily available for reasonable prices, and the chain is robust compared to thinner chains.
A long cage derailleur may not be required - but will allow a larger rear cog than a medium cage. Long cage hangs lower than medium, so can be more exposed to grasses or rocks.