I think the only way to push humans to medieval times would be to push society to before that point in time and then let it rebuild.
The problem of knowledge
So long as their exists knowledge of the modern day, that knowledge can be used to progress technologically far faster than humans would otherwise be capable of. I personally could write down the basics of atomic theory, calculus, and gunpowder manufacture, as well describe how steam and internal combustion engines work. Especially given the huge amount of raw resources that the survivors would have in the form of old equipment that can be turned to scrap, humans could fairly quickly recover to an industrial revolution-era level of technology, even if there were no electronics or petroleum reserves.
To get people to really regress in terms of technology, you'd have to destroy everyone who has knowledge of technology, and either all records of modern technology or everyone who can access those records.
Medieval technology, of course, would be reliant on preserving the same sort of knowledge, just of a different variety. The problem with preserving this knowledge and eliminating modern knowledge, though, is that there isn't really any community on Earth that lives in this sort of manner. Most knowledge of medieval society is held by fairly educated people who have devoted their lives to studying it, while someone like a farmer is more likely to know how their tractor works.
So how do we do this?
Kill off everyone who lives in a modern city. I imagine that a well engineered supervirus, ideally with a few months of latency followed by rapid onset lethal symptoms, perhaps coupled with a world wide thermonuclear war, would do the trick. The only people left would be those with no contact with the rest of society. Basically, this would mean primitive uncontacted tribes of hunter-gatherers. These people exist in quite a few countries, like Brazil and Papua New Guinea. If they were the only ones left to repopulate, they'd spend a few thousand years spreading through the rest of the world, building civilizations and probably avoiding the irradiated wastelands of the former cities.
Eventually, these new people would arrive at something akin to what we view as a medieval society, a few thousand years after the initial war.