A restructuring plan that Exxon Corp. started in 1981 helped the largest U.S. oil company earn $1.71 billion during the first quarter, but officials told shareholders yesterday to prepare for lower earnings in the future.

Also in the oil sector yesterday, The Royal Dutch-Shell Group of Cos. announced sharply lower earnings for the first quarter, blaming the global slump in crude oil prices. Pennzoil Co., in a statement revised to comply with a federal ruling, said that its previously announced profit was a loss.

Campbell Soup Co. reported that its third-quarter earnings dropped a penny a share despite a 7 percent increase in sales compared with the same period last year.

Exxon Chairman C. C. Garvin Jr. said at the company's annual meeting in Houston that "there isn't much doubt that there are harder times ahead."

"The fact that we were able to do as well as we did last year was in substantial part attributable to those steps: the phasing out of inefficient capacity, the upgrading of retained facilities and the strengthening of our resource base."

He said the streamlining will continue with a targeted reduction of 6,000 people, or 15 percent of Exxon's total work force. It will be early July before Exxon officials know how many workers will take early retirement and how many will be laid off, Garvin said.

Exxon reported a 29 percent increase in earnings to $1.71 billion ($2.35 a share) in the first quarter from $1.32 billion ($1.71) in the first quarter last year. The per-share increase was 37 percent.

Revenue dropped 4.4 percent to $22.24 billion, while capital and exploration expenditures rose 14 percent to $2,18 billion.

*Royal Dutch-Shell said its profits fell 34 percent. The company, which has headquarters in London and the Netherlands, said its net income for the first quarter was $1 billion, down from $1.2 billion in the first quarter of 1985.

The group's total revenue was $22 billion in the latest quarter, compared $22.4 billion a year earlier, Grapsi said.

*Pennzoil, based in Houston, said it lost $16.1 million in the first quarter compared with a gain of $57.4 million ($1.20 a share) a year earlier. Pennzoil originally had reported a 1986 first-quarter gain of $42.3 million (93 cents).

The downward revision resulted from the Securities and Exchange Commission's May 6 rejection of a proposal that would have permitted oil companies to defer write-downs on oil and gas property costs until Dec. 31, based on the expectation that oil prices would improve by then, Pennzoil Chairman J. Hugh Liedtke said.

*Campbell Soup Co., which is based in Camden, N.J., said net earnings for the period that ended April 27 were $51 million (79 cents a share), down from $51.6 million (80 cents) in the comparable quarter in 1985. Sales were $1.09 billion, up from $1.02 billion.

Campbell President R. Gordon McGovern said that, excluding unusual nonoperational items that affected third-quarter results in both years, the net earnings for the third quarter of fiscal 1986 were actually up 6 percent from the 1985 quarter.

Campbell said net earnings for the first nine months of its current fiscal year were $175.5 million ($2.71), up from $158.4 million ($2.45).