@Rhys already said that in general, bikes will do very badly if left out in the rain. The mechanical components will get destroyed.
Focusing on the lithium ion battery's usability: their charge capacity is affected by temperature. This is an inherent limit due to chemistry and physics. Batteries simply do not generate as much power when cold because the reactions in the battery slow down. Electric cars do lose significant range in cold weather. Moreover, their batteries appear to have internal battery heaters to get their batteries to their preferred operating temperature. I do not believe these heaters are common on bike batteries.
Bosch, which makes electric bike motors, recommends that if you're storing your bike in an unheated area, you remove the battery when parking and bring it indoors. They also advise that you charge the battery at room temperature. As outlined in an answer on a different SE site, if you charge a lithium ion battery under freezing temperature, you will damage it irreversibly. Good batteries are expensive, so you don't want to do this. Note that you don't want to charge the battery while it is under freezing temperature, so you may have to wait for a battery to warm up a bit after you bring it inside to charge.
I can't find anything specific on how storing a lithium ion battery at cold temperatures affects its service life. So, simply being outside for a long time at temperatures above freezing may be just fine, as maybe corroborated by this SE answer and this post by a battery manufacturer.
Side note: Bosch's recommendation leads me to suspect that their batteries don't have heating circuits. You can't take your Tesla's battery out and carry it into your office, so clearly the heaters are vital for cars. But they'd add weight to e-bikes, which are already quite heavy.
As pointed out by @Rhys, higher end bikes may have waterproof batteries. Whatever bike you get may not be this waterproof. You might want to check the battery's water resistance rating for interest. It's sort of a moot point, because I would highly not recommend storing the bike uncovered - never mind the battery, a lot of the mechanical components will fare miserably if exposed to weather (chain, hubs, bottom bracket, and headset).