Not quite. HST was initially supposed to be a 3m telescope, but they had to go down a bit in size for budget reasons. And the reason for going for exactly 2.4m (instead of 2.5m or 2.2m) was that they could save even more money, because the mirror size of the military spy satellites was exactly the same and they could use some of the same manufacturing process.
The rest of the satellite is quite different to a spy satellite however.