Both companies have mapped out multibillion-dollar investments in new North American EV and battery factories, aimed at challenging Tesla and a flock of smaller EV startups.