A House Ways and Means Committee task force, in a bow to the real estate industry, recommended yesterday that taxpayers be allowed to continue fully deducting mortgage interest on second homes.

The deduction would be in addition to interest deductions allowed for a principal residence, other interest deductions of as much as $20,000 a year, plus an amount equal to the taxpayer's investment income.

President Reagan and Committee Chairman Dan Rostenkowski (D-Ill.) had called for limiting the interest deductions in a way to curtail write-offs taxpayers now may get for interest paid on a vacation home mortgage.

The task force proposal is scheduled to go before the full Ways and Means panel today, along with a package of other proposed changes in real estate taxation. The most important of the other proposals would curtail but not eliminate a provision in the tax code that lets investors in real estate tax shelters write off more in deductions than they invest in the project.

A seemingly disgusted Rep. Fortney H. (Pete) Stark (D-Calif.), task force chairman, said its compromise proposal would curtail few of the abuses that have let high-income investors in real estate shelters pay little or no tax.

"I was outgunned by a real estate lobby that knows no limits to its greed," Stark said. Although the proposals would "prevent a little of the sheltering of high-income people, the real estate industry creates more shelters and abuse than makes any economic sense for the U.S.," he said.

The real estate task force was the only subgroup of the committee to arrive at an agreement yesterday. Another six-member panel assigned to find ways to cut business depreciation write-offs and the investment tax credit, both important to business, quit without a solution.

The interest-limitation provision approved by the task force, committee sources said, would discourage the worst abuses of tax avoidance through real estate shelters. Taxpayers now can deduct all mortgage interest plus interest paid on consumer loans, auto loans and credit-card loans. Up to $10,000 worth of interest on loans made to finance investments also can be deducted.

The Reagan plan would have limited interest deductions to interest on the mortgage on a principal residence, plus $5,000, plus an amount equal to the taxpayer's investment income. Rostenkowski altered that to an amount equal to investment income, plus first-home mortgage interest or $20,000.

The task force proposal changes that "or" to "and" (the dollar limitation would be $10,000 for a single taxpayer) and adds another house. The group also decided that "time-sharing," where taxpayers "own" a certain amount of time per year in a vacation property and pay for it with borrowed money, would be counted as a second home.

The task force would let taxpayers write off more than they invest if the money is borrowed from anyone other than the seller of the property.

Meanwhile, a group of prominent economists sent a letter to committee members warning that this round of tax overhaul could become "just another political struggle to determine who pays and who escapes taxation" if the committee does not concentrate on lowering tax rates and broadening the tax base.

It was signed by 12 tax economists, including Joseph Pechman, Harvey Galper and Henry Aaron of the Brookings Institution, John Makin of the American Enterprise Institute and Charles Hulten of the University of Maryland.