Jeremiah 27:7

And all nations shall serve him, and his son, and his son’s son, until the very time of his land come: and then many nations and great kings shall serve themselves of him.

Jeremiah 27:7 belongs to a series of acted messages warning Judah as Babylonian danger drew near, urging the people to honor their obligation to God and maintain friendly relations with Babylon.
God Himself gave the surrounding nations into Nebuchadnezzar's power and required them to serve him.
The one to be served, with his son and his son's son, means Nebuchadnezzar, his son, and his grandson, that is Nebuchadnezzar and his descendants.

The service to Babylon was for a set and limited time, lasting only until the very time of his land came, when Babylon's appointed period ended.
That appointed period of servitude was seventy years.
Submission to Babylon's rule was the merciful course God set before the nations, while refusing it would bring famine, sword, and pestilence.

When that period ended, God would deliver the captives from Babylon.
Then God would punish Babylon and bring its proud king and oppressors under judgment, when many nations and great kings would rule over Babylon.