Independent candidate John Anderson (R-Ill.), facing a crucial decision on whether his name will be printed on the Maryland ballot, said today he would not drop out of the presidential race even if President Carter were denied the Democratic nomination.

Three hours before Anderson's speech to a $100-a-plate luncheon at the Lord Baltimore Hotel here, supporters of the 58-year-old congressman filed another 5,000 petition signatures with election authorities in seven counties, bringing his statewide total to 95,000 signatures.

State law requires petitions signed by 55,517 persons to quality a candidate for listing on the November ballot; one-third of them must be submitted before March 4. The Anderson organization, which did not begin its independent phase until the candidate launched his national unity campaign on April 24, is challenging the state law. Federal District Court Judge Joseph Young is scheduled to rule on the challenge on Monday.

Anderson said at a morning press conference that the nomination of "still another partisan candidate" by the Democrats would not prompt him to drop his bid for the presidency.

"I am simply going to continue," he declared.

At the luncheon, attended by Anderson's wealthiest and most prominent supporters in the state, the candidate denounced "lackluster leadership" of the Carter administration and "the crackpot novelties" of Republican candidate Ronald Reagan.

The audience of 175 included Milton Eisenhower, brother of the late president and chairman of the statewide Anderson effort, and Jerold Hoffberger, former owner of the Baltimore Oriorles baseball team.

Anderson said the two major parties had "proved unequal to the task of forming a realistic post-New Deal program."

The great failing of the Carter administration is the "inability to engage in substantive consultation with Congress," Anderson asserted.

He described the Republican Party platform calling for military superiority to the Soviet Union as "simplistic" and said nominee Reagan's pledge to eliminate $100 billion in waste from government spending was a "phony promise."

Anderson said his supporters have completed efforts to get on the November ballot in 20 states.

In Maryland, the state attorney general opposes Anderson's challenge of state election law and has filed a motion with the court saying the only candidates inconvenienced by the March deadline were "political stripe-changers."