The Soviet Union's decision to intervene massively in Afghanistan was a historic miscalculation likely to bring additional shifts in Kremlin policy in the months to come, according to Marshall D. Shulman, the senior State Department expert on Soviet affairs.

In a meeting with reporters, Shulman predicted that the Soviet initiative will run into increasing difficulty on the mountainous terrain of Afghanistan, and that it will generate a much stronger and more lasting western response than the Soviets expected.

The initial Soviet reaction will include an old-style agitprop peace offensive aimed at creating and exploiting gaps in viewpoint between the United States and its European allies, Shulman said.

He said that later and more fundamental shifts could produce either intensified Soviet military activity or, if the costs of this are seen as too great, a reversal of Soviet policy away from military intervention.

Much depends on the success and staying power of the U.S. and allied response in raising the costs to the Soviets of military activity in Afghanistan and elsewhere, Shulman said. A less predictable factor in the outcome, he said, is the influence of the Kremlin succession process as President Leonid L. Brezhnev passed from the scene.

Saying that the lack of detailed information makes certainty impossible, Shulman advanced the guess that high Soviet military officers, "with all their gravity and with all their braid," convicted the Politburo that moving into Afghanistan was a vital necessity in the interest of national security.

I can imagine a military group promising a neat, surgical 90-day or 120-day operation, a finite time period. . . [but] I think they are in for a protracted and difficult time. I think they may be drawn into carrying the burden of the fight against the insurgents in Afghanistan for a long time," Shulman said.

Another element of miscalculation, he continued, is that the Politburo "very seriously underestimated the effect on the United States and the rest of the world." Possibly believing that their relations with the United States were already at rock bottom, it is likely the Russians were surprised at the very strong reaction that made their position with Washington and the West much worse, he said.

The western reaction is likely to last longer than earlier reactions to postwar exertions of Soviet power in Eastern Europe, Shulman said. "This is not like Czechoslovakia. The problem itself is different. Afghanistan is likely to be a continuing source of concern and apprehension" to the world outside, he added.

The principal lever for potential change away from Soviet military activism, Shulman suggested, is economic. An even greater military emphasis, in the face of economic hindrances and rising military competition from the West, would skew Soviet priorities and confront senior planners with painful choices.

"The future of Soviet power requires them to repair their economic base. In time, perhaps a long time, logic will bring them back" to a policy of reduced risk and resistance abroad, he said.

In a new display of private U.S. retaliation, the American Society of Civil Engineers announced yesterday that it is pulling out of a long-planned scientific exchange with the Russians, and said it is closing the door on all such exchanges "until the U.S.S.R. ends its occupation of Afghanistan."

The group is one of 22 engineering societies that have participated in Soviet-American exchanges. The international council of the American Association of Engineering Societies, an umbrella group, is to meet soon to decide on an overall stand toward continuation of exchanges.

In a related development, former U.S. ambassador Malcolm Toon expressed surprise yesterday that the Afghanistan invasion made such a dramatic impact on the thinking of President Carter.

Toon said in an interview on the NBC "Today" program that, as ambassador in Moscow until October, "we reported almost daily our feeling that, if necessary, the Soviets would move into Afghanistan with force in order to protect their power position." He said "this was simply consistent with past Soviet behavior."