The Securities and Exchange Commission charged yesterday that two former officials of E.C. Ernst Inc. filed information with the agency that misled investors about how profitable the troubled electrical construction company was in 1977--the year before it filed for reorganization under federal bankruptcy laws.

According to the SEC, former Ernst director Edward P. Johnson Jr. of Potomac and former vice president for finance Richard A. Clay of New York were responsible for information reported in proxy statements and other materials that painted the D.C. company's finances in a rosier color than was warranted.

Johnson and Clay consented to a permanent injunction entered against them by U.S. District Court Judge Charles R. Richey without admitting or denying the SEC's charges. The injunction bars them from further violations of federal securities laws.

According to the SEC, Ernst's income statement of Dec. 31, 1977, misled investors about how much money might be realized from negotiations over contract changes on a construction job in Saudi Arabia by not including information about potential difficulties in collecting those charges.

The statement included in its computations approximately $8.9 million, even though Johnson had been told by Ernst's chief on-site estimator that the proposals would be settled for $3 million to $4 million, according to the SEC.

Proxy statements also overstated pretax income and assets by $274,000 by failing to write off, as they should have, Ernst's investment in a joint venture in which the other firm had been judged bankrupt and liquidated, according to the SEC.

The SEC said that Clay directed preparation of the statements and that Johnson signed them "without satisfying himself as to the accuracy of the financial information."

The two men were charged with violating reporting provisions pertaining to proxy statements. The statements were prepared in connection with a proposed merger between Ernst and L. K. Comstock & Co. that took place in June 1978 and was rescinded in the summer of 1981.

E. C. Ernst filed for reorganization in December 1978. At the time, the company had debts of more than $50 million. Johnson, who was also president of an Ernst subsidiary and whose father had been chairman and chief executive officer of the company, resigned in July 1978. Clay left the firm in August 1978.

Ernst has been struggling back from bankruptcy since then, reporting in 1980 its first quarterly profit since the reorganization.