TOKYO — The on-the-job death of a Subaru worker, a decadeslong veteran crushed to death by a 25-ton mold at a factory in Japan, undercut earnings in the carmaker's latest quarter by eating into global production and denting sales, despite robust demand for the brand's vehicles.