From a .308, with no concern given to rifle size or weight, I could see going with a 26 inch barrel with a 1:10 twist to stabilize bullets of 175 to 190 gr. But the .308 case is relatively small and efficient. It does well with barrels down to 16 inches and in a portable package is well served with an 18 inch barrel. You could probably go with a barrel longer than 26 inches without seeing a loss in velocity, but any gain you experienced is probably going to be pretty small. So for optimal performance from a full-size set up, a barrel length of 22 to 26 inches makes the most sense, IMO.
A longer barrel makes a lot more sense with the .300 Win. It's less efficient but has enough capacity to deal with a healthy dose of some of today's slower burning propellants. I don't think a barrel length of less than 26 inches on a .300 Win intended for long range shooting or ballistic performance makes any sense. If I was setting a rig up around the .300 for 1200 to 1500 yard steel plates and paper, it would probably have a heavy contour barrel of 27 to 28 inches on it, with a fast enough twist to stabilize a long HPBT of 200 to 220 grs--something like the 220 gr SMK or Hornady's 208 gr Amax. The .300 has the capacity to drive either of these high BC bullets at over 2800 fps, but is going to do best with a fairly long tube. You could probably see usable ballistic gains going up to a 30 or 32 inch barrel, if you were so inclined.
My dad has a custom .338 RUM based on a M700 LA with a 30 inch Lilja #5 on it. Without even touching max listed loads, we watched 250 gr SMK chrono at over 3100 fps. Some of today's modern propellants have slow burn rates that will help achieve never before seen velocities from some of the more expansive cases available, but they need barrel length to do it. This is part of the reason I am a big fan of barrel length for most applications. I certainly think people should be getting as much of it as is practical for their use. For example, I prefer 26 inch tubes on magnum sporters and 24 inch tubes on non-magnum sporters. I don't see any reason for a heavy-barreled "beanfield" type rifle chambered for a magnum cartridge to not have a barrel of at least 26 inches, with 28 inches being even better. But of course, that is personal preference. The hunting I do is usually in country open enough to not have to worry about a little loss in handiness, and to take advantage of an extra 30 to 50 fps per inch of additional tube.