Does the speed of a trade vessel affect the trade route's worth ?
No. The speed of your frieghter only changes how quickly you can establish the trade route. Once established your frieghter is replaced by speed 1 trade vessel if I recall correctly. Your speed has nothing to do with the value of the route, the prime determinant of the value of the route is distance although I'm pretty sure that the population and/or income of the two terminal planets is involved as well.
it doesn't seem possible to have a fleet of freighters do 1 trade route
It isn't. There is the UP event that arms frieghters but I think that's about all that can be done.
1- Trade ship 2 trade modules speed 2 should produce a trade route twice as lucrative as a freighter with 1 trade module speed 2.
Nope, this isn't the way it works. Like I said your friegther is replaced with a generic trade ships that slowly moves back and forth between the end points at 1 parsec per turn. Speed has nothing to do with it.
What is the formula used ?
I don't know. As you mentioned you can increase the value of a trade route by placing econ starbases along it's path. I have known folks take this to the extreme and line the entire path with as many econ starbases as possible and reach values of on the order of 8,000 bc's per turn for one trade route. However in my opinion this is not worth the time and effort involved. It's an interesting experiment but the total income from trade is almost always dwarfed by your income from taxes in anything but the rarest galaxy setups.