House Speaker Thomas P. (Tip) O'Neill Jr.(D-Mass.) showed the Democratic flag in the escalating debate on education in an unusual appearance as a witness at a House hearing yesterday.

O'Neill cited the "many successes" of federal efforts in education and chided President Reagan for the big spending cuts he has proposed and some he has already wrought, such as reductions in the guaranteed student loan program.

"Despite the administration's claims, President Reagan has not made education a high priority," O'Neill said. "Last year he proposed a $4.4 billion cut and this year proposed a $2.1 billion cut. If the president's proposals for 1984 and beyond were enacted, federal spending would fall from $16 billion in 1981 to $9.5 billion in 1988, after adjusting for inflation."

The speaker offered his views at the first of a series of hearings called by the House Budget Committee's Task Force on Education and Employment.

Secretary of Education T.H. Bell testified on behalf of the administration, urging that first priority be given to stiffer educational standards and defending Reagan's outspoken advocacy of merit pay for better teachers.

Bell acknowledged that the commission's recommendations are "eventually" going to cost more dollars "on some level," but he argued that it was more important first to make basic changes in how the educational dollar is spent.

Bell agreed that the Reagan administration has proposed cuts in federal spending on education. But he defended Reagan's claim that such spending has not been cut, since the president, after all, signed the higher appropriations bills passed by Congress.

Rep. Frank Harrison (D-Pa.) objected, "You're saying we should judge the president on the compromises he's been forced to accept."

Bell replied, "I'm saying we at least ought to get credit for compromising . . . . "

Sen. Edward M. Kennedy (D-Mass.), contrasted Reagan's declarations that "education is a top priority" to what Kennedy called two prior years of a "scorched-earth" policy. He said the federal education budget would have plummeted 20 percent if Reagan had had his way.

"Perhaps, if there is a silver lining to the present controversy," Kennedy said, "it is that President Reagan has finally sent David Stockman to the principal's office--and we have seen the last of the administration's harsh proposals for education cuts.