The short answer: it depends on the cheese. Health authorities say soft cheeses made from pasteurized milk are generally fine, but soft cheeses made from unpasteurized (raw) milk should be avoided in pregnancy because of listeria risk. This guidance draws on advice from the CDC, FDA, ACOG, and the NHS.
Soft cheeses include brie, camembert, feta, blue-veined cheeses (like Roquegort or gorgonzola), queso fresco, queso blanco, and panela. They are higher in moisture and less acidic than hard cheeses, which is why bacteria can grow more easily in them. The key question for pregnancy is not softness alone but whether the cheese was made with pasteurized or unpasteurized milk.
The FDA and CDC warn that soft cheeses made from raw (unpasteurized) milk can carry Listeria monocytogenes, a bacterium that survives even in refrigerated conditions. The CDC notes that pregnant people are about 10 times more likely to get listeriosis, which can cause miscarriage, stillbirth, premature delivery, or serious newborn infection. The NHS advises avoiding mould-ripened soft cheeses (like brie and camembert) and soft blue cheeses unless they are cooked until steaming hot, because listeria can be present even when the label says pasteurized.
Check the label and choose soft cheeses clearly marked as made from pasteurized milk, and avoid any raw-milk cheese. The NHS says hard cheeses (such as cheddar and parmesan) are considered safe, as are pasteurized soft cheeses like cottage cheese, mozzarella, cream cheese, ricotta, and processed cheese. Thoroughly cooking a soft cheese until it is steaming hot also kills listeria. When a cheese is unlabelled, from a deli counter, or you are unsure, the cautious choice is to skip it or cook it first.