Question: would the IQ be so much different if you took the same photo (something like an early evening sunset) with both lens, say at a setting of f5.6, ISO 100, 20mm length, using a tripod and remote release?
The more you stop down a lens, the more comparable many of them become. The general consensus is that, stopped down, the 16-35 and 17-40 are very similar, and if you'll be using it a lot for f/8 landscapes, its easier to save money with the 17-40.
This is generally true with all lenses where there are multiples (non-L v L primes, etc)...if you have the ability to shoot at f/5.6 or f/8 all the time, you won't see a big difference in spending twice as much. But, you often buy the more expensive version because you need something else it does (f/2.8 allows faster shutter speeds than f/4, for example...or the f/1.4 of primes is important for depth of field control)
Can I assume that the shutter speed of the f2.8 would be half that of the f4? and with a tripod would the IQ be so different?
At the same focal length, if your aperture and ISO are the same on both cameras, they will both give you the same shutter speed. Shutter speed, aperture and ISO are all inter-connected to set the exposure on your camera; if you lower one, you have to raise another to get the same exposure.
Now, at f/2.8 the 16-35 would have twice as fast a shutter speed as the 17-40 at f/4. That could be the difference between 1/50th s shutter speed and 1/100th, which might be the difference between getting a shot of people that's blurry, or one that is clear. The f/4 lens can't get that same shutter speed without raising ISO, which is something that isn't always ideal to do. Likewise for night photography, the f/2.8 might allow you to take a shot at 10s exposures, where you'd either need to boost ISO or shoot at 20s with the 17-40. The use cases are more specific for why you'd want the 16-35, but, when you need it, its invaluable.