Let's say that China is much tougher in the Second Sino Japanese war, maybe a POD where they manage to rebuild their army in 80 German trained divisions like it was the plan, or something else.
The Marco Polo incident happens as usual, but at the battle of Shangai the Japanese are surprised to find a Chinese version of Khalkin Gol when they are soundly beaten back.
Would Japan keep attacking China?(1) If no, what else? Do they invade the USSR? (2) If not, then what?
(1) - Yes. Japan was already attacking China from the north after the Marco Polo Incident.
(2) - No, the Japanese wouldn't invade but border skirmishes are likely as OTL.
However, it depends on when the Japanese lose the Battle of Shanghai on what they do. The Japanese forces started at 6,300 Marines but increased to over 200,000. If the Japanese are immediately defeated and driven from Shanghai, the additional forces would either reinforce the northern invasion or be used as OTL to amphibiously invade near Shanghai or some other location. If it occurs after the Japanese have increased their forces, it may lead the Japanese to negotiate similar to what they did after border conflicts in 1933-see the
Tanggu Truce. However, if there is another truce between Nationalist China and Japan, Nationalist China would most likely try for a rematch with the Communist Chinese forces. If they have this larger well trained and well equipped force, the Communists would probably be defeated. But the Nationalists having an 80 division well trained and well equipped force in 1937 is probably an ASB scenario because the Nationalists would have had significantly better forces earlier in the Chinese Civil war. This would have allowed them to crush the Communists during the Long March.