An inquiry found that more than 500 mothers and babies either came to harm or died due to poor care.