Spain is preparing to sponsor European backing for the so-called Contadora peace initiative after a series of key meetings in Madrid involving members of Spain's Socialist government, Central American politicians and the head of the Socialist International, Willy Brandt.

A senior Spanish official said today it was hoped that motions addressing themselves to the Central American peace initiative of the Contadora group--Colombia, Mexico, Panama and Venezuela--would be placed before the 10-nation European Parliament and the 21-nation European Council assembly before the end of this month.

The official said it was believed that European support for the Contadora nations could have an important psychological effect and give their initiative more weight and substance at a time of concern over escalating tension on the border between Nicaragua and Honduras.

Many Western European governments have been critical of the Reagan administration's policy in Central America, and there is also widespread public opposition to that policy in Europe. Many governments, however, have indicated that they are reluctant to criticize Washington too strongly on the issue since they see it as a Western Hemisphere issue and they have other bilateral issues to discuss with the United States.

Mexico announced that the presidents of Mexico, Venezuela, Colombia and Panama are to hold a summit meeting this weekend at the Mexican resort of Cancun, United Press International reported. The announcement of the Contadora meeting came as a surprise.

It was announced in The Hague that more than 400 European legislators had sent a letter to the U.S. Congress criticizing U.S.-supported "attempts . . . to strangle the people of Nicaragua by economic isolation and military attack." Among the signers of the letter were Hans-Jochen Vogel, head of West Germany's Social Democratic Party; Pierre Joxe of France's ruling Socialist Party and Joop den Uyl, leader of the Dutch Labor Party.

The driving force for the European backing is Spanish President Felipe Gonzalez, who is a vice president of the Socialist International with special responsibility for Latin American affairs. Widely considered an expert on the nuances of the Central American crisis, Gonzalez last toured the Contadora nations at the end of May, when he endorsed their peace plans.

The Spanish official said Gonzalez was encouraged to seek European backing for the peace initiative when he met with members of the Senate Foreign Relations Committee during an official trip to Washington last month. He said that Sen. Charles McC. Mathias Jr. (R-Md.) asked Gonzalez to examine European support that would complement efforts to create a bipartisan and broad body of opinion in the United States favoring the initiative of the group, which is named for the Panamanian resort island where it first met.

In the past week Gonzalez has held discussions in Madrid with former West German chancellor Brandt. The Socialist International has considerable leverage in European legislative and consultative forums through its member socialist and social democratic parties.

Last week Gonzalez also met with exiled Chilean politician Andres Zaldivar and with former Salvadoran president Jose Napoleon Duarte, both representatives of the Christian Democratic International.

The official said Gonzalez and Brandt had agreed that Christian democratic parties should be invited to join the Socialist International in the European stand on Central America.

Sitting in on the meetings with Brandt were the former presidents of Venezuela and Costa Rica, Carlos Andres Perez and Daniel Oduber, whose parties are affiliated with the Socialist International. Gonzalez and Spanish officials also met in Madrid with the foreign ministers of Honduras and of Nicaragua, Edgardo Paz Barnica and Miguel D'Escoto.