A Maryland education commission today recommended that the state increase its aid to local school districts by $41 million next year in an effort to close the gap between spending levels in the state's wealthy and poor school districts.

The recommendation, which followed a two-year study by the Barnes Commission, will be forwarded to Governor-elect Harry R. Hughes in time for him to include the increase in his first state budget, if he so chooses.

If approved by Hughes and the General Assembly, the revised school aid formula would mean an increase in state aid to local school districts from $305 million this year to $346 million next year. The panel also recommended, in principle, a similar $41 million increase for the succeeding four years.

"The new governor has said he fully supports equalization and wants to reevaluate the entire fiscal relationship between the state and local subdivision," said Thomas Schmidt, secretary of the state Department of Budget and Fiscal Planning. "I think he should do that unfettered by a full five year plan. One year is enough for now."

For the last four years Maryland has used an aid formula that doles out a maximum $690 per pupil to school districts, with larger grants going to the state's poorer school districts.

Many educators feel, however, that today it actually costs nearly 2 1/2 times that amount to educate a pupil. Some districts are better able than others to make up the difference because of variations in the size of local tax revenues.

The panel decided to retain, with slight adjustments, the present distribution formula, but to gradually raise the maximum grants allowable. By the 1983-84 school year the maximum state grant could exceed $900 per student.

If the recommendation is approved, Montgomery County would receive $202 per pupil next year, an increase of $18, and Prince George's County would get $446 per pupil, an increase of $53. Included in the recommendation was a $5 million increase in aid to compensatory education for 116,000 students who qualify for the federal government's free lunch program.