The biggest U.S. health insurer said it has suffered major losses on policies sold on the Affordable Care Act’s exchanges and will consider withdrawing from them, adding to worries about the future of the marketplaces at the heart of the Obama administration’s signature health law.

The disclosure by UnitedHealth Group Inc., which had just last month sounded optimistic notes about the segment’s prospects, is the latest sign that many insurers are finding the new business unprofitable, despite an influx of customers that has...