A $5 billion public service jobs bill, which would be the second major anti-recession bill of the year, cleared a first hurdle in Congress yesterday when it passed a House Education and Labor subcommittee by voice vote.

The bill, which would fund about 500,000 jobs for the long-term unemployed, is being pushed by the Democratic leadership of the House, but is likely to be cut back considerably in the Republican-controlled Senate. President Reagan has opposed any further jobs programs on the assumption that the economy is improving.

"We don't consider this a quick fix," said subcommittee Chairman Augustus F. Hawkins (D-Calif.). "We're dealing with people who are very difficult to employ even during a recovery. Reagan's budget projects 7 percent unemployment in 1987." Hawkins said the bill "addresses the needs of women, who make up 40 percent of the unemployed," while in the past public-service jobs have been almost exclusively in heavy and light construction activities "which tend to be male-dominated."

Rep. John N. Erlenborn (R-Ill.), ranking Republican on the full committee, called the bill "back-door revenue sharing. It gives money to cities to hire people they would have hired anyway. It is politically profitable for the Democrats to attack unemployment, but you'll create more jobs in the private sector by moderating federal expenditures."

The bill would give grants to states and local governments for repair of roads, water systems, schools and mass transit facilities; erosion prevention and forestry operations; strip-mine reclamation and services such as health care, emergency food and shelter and child care.

Under the formula approved by the subcommittee yesterday, the District of Columbia, with an average unemployment rate last year of 10.7 percent, would receive $14.8 million, an amount expected to create about 1,480 jobs.

Maryland, with an average 8.7 percent unemployment, would receive $78 million. Virginia, with an average 7.5 percent unemployment, would get $55 million.

The jobs would be ready 30 to 60 days after the bill became law, Hawkins said. Only those who have been jobless for at least 15 out of the last 20 weeks would be eligible, with priority for those who have exhausted or are unable to receive unemployment benefits.