A scientist who has led a drab but blameless life decides to sell his soul to a demon, or maybe the Devil himself, in exchange for a task. If memory serves, the demon heads the terrestrial branch of Hell, but is only one of many in the Universe. He is not in charge of Hell, but hopes to win the next election, for he is not only clever, but justifiably proud of his work on Earth. He looks forward to providing this puny man with whatever he wants, which will take only a finite amount of time; he can return through time and resume his own ambitions. It doesn't matter whether the man wants wealth, pleasure, or fame; the task will not take long from his point of view, and another soul will be lost to heaven forever. So the demon agrees readily before hearing what the task is. It's always worked before. Heaven trembles.
And then the scientist states his terms. The demon's task is to provide the scientist with safe transportation and measuring instruments in space and time, because he has never felt much attachment to other people but is curious about everything. He will deduce the physical laws, structure, and history of the entire Universe. Oh, and he wants no hints or interruptions, so please be silent; he will deduce all this by himself. The demon exclaims, more or less, "But that will take longer than the entire duration of the cosmos!" He realizes that having been stung like this, he will never be elected to a higher position even if he still wants to after returning from so long a period as the scientist's assistant. Heaven smiles. The scientist directs the demon to the Earth's core, where, he says, he would like to resolve some longstanding questions in physics.
The story was read in an English-language anthology, probably in the 1960s or 70s.