Moderna Inc. recorded another quarterly loss as vaccine sales wane and the company had an unexpected charge for a canceled manufacturing contract.