Here's a rail map of Wisconsin.
It looks like the most direct route from Milwaukee to Madison would be by CP to Watertown and then the state-owned Wisconsin and Southern into Madison. A more roundabout route would be to Waukesha on UP and then the Wisconsin and Southern (a different line) into the Madison area. If you're talking about direct service to Chicago, UP has line that passes through Janesville and continues on to Madison, connecting to the Wisconsin and Southern, but, except for Janesville, doesn't serve any intermediate towns of any size.
It's interesting that there's a lot of state-owned trackage in the area, which might reduce the costs of land acquisition, etc., thereby decreasing construction costs, ut then, I don't know what shape these lines are on and how much work would be needed to upgrade to even 79 mph service. (which would probably be sufficient for a short corridor like this.)