Mr. Musk violated a settlement when he published information about production goals without seeking approval from his company?s lawyers, the Securities and Exchange Commission wrote to a judge.