"Flux", a novelette by Barrington J. Bayley and Michael Moorcock, also the answer to this question; first published in New Worlds Science Fiction #132, July 1963, available at the Internet Archive. You probably read it in the 1967 anthology Voyagers in Time edited by Robert Silverberg, or perhaps in Peter Haining's 1997 anthology Timescapes: Stories of Time Travel aka Time Travelers: Fiction in the Fourth Dimension.
The agent is briefed on his mission:
"Europe suffers from compression," Standon continued. "Everything is so pressurized, energies and processes abut so solidly on one another, that the whole system has massed together in a solid plenum. Politically speaking, there just isn't room to move around. Consequently, we are unable to apprehend the course of events either by computation or by common sense, and we are unable to say what will result from any given action. In short, we are in complete ignorance of the future, whether we participate in it or not."
[. . . .]
"Our only hope lies in discovering how events are organized in time—this might sound highly speculative for such a serious and practical matter, but this is what things have come to. In order to take effective action in the present, we must first know the future. This is the mission we have in mind for you. The Research Complex at Geneva has found a way to deposit a man some years in the future and bring him back. You will be sent ten years forward to find out what will happen and how it will come about. You will then return, report your findings to us, and we will use this information to guide our actions, and also—scientifically—to analyze the laws governing the sequence of time. This is how we hope to formulate a method of human government for use by future ages, and, perhaps, remove the random element from human affairs."
In the future, the visit to the library and the battle of the sexes are much as you described, but the agent is not required to drop his pants:
As he mounted an interlevel ramp he saw one or two figures, mostly alone. He had never seen so few people. Perhaps the quickest way to find out what was going on would be to locate the library and read up some recent history. It might give a clue, anyway.
He reached the building which pushed up through several layers of deserted street. A huge black sign hung over the main entrance. It said:
Puzzled, File entered the cool half-light and approached the wary young man at the Inquiry desk.
"Excuse me," he said, and jumped as the man produced a squat gun from under the counter and leveled it at him.
"What do you want?"
"I've come to consult recent texts dealing with the development of Europe in the last ten years," File said.
The young man grinned with his thin lips. The gun held steady, he said, "Development?"
"I'm a serious student—all I want to do is look up some information."
The young man put away the gun and with one hand pressed the buttons of an index system. He took two cards out and handed them to File.
"Fifth floor, room 543. Here's the key. Lock the door behind you. Last week a gang of women broke through the barricades and tried to burn us down. They like their meat pre-cooked, eh?"
File frowned at him but said nothing. He went to the elevator. The young man called, "For a student you don't know much about this library. That elevator hasn't worked for four years. The women control all the main power sources these days."