I have a sneaking suspicion you don't actually want answers to your questions, but I'll provide them anyway.
The problem is that if it takes 20 years to build an airplane that design will be obsolete by the time it gets deployed. So upgrading just increases costs. Why did it take 20 years? Isn't that a bit excessive?
Not really. A-10 development took 10 years, F-18 took 8, and the F-15 took 13, all measured from program start to initial production. The F-35 began its production run in 2008, 12 years after its program started. I haven't found timelines for the earlier planes' IOC milestones, but I'm under the impression that they followed similar schedules, with production running for a few years before pushing the planes out into use. Yes, the F-35's timeline is drawn out because they're trying to design three planes at once, but that was also expected from the start.
Why doesn't the software work?
Because it's not required to work until next year, at the earliest. What's in use now would be good enough to fly and work out other problems, but it's not suitable for combat use.
Why could it not fly in the the rain for God's sake?
Rain isn't the problem. It's actually lightning that the F-35 isn't currently allowed to fly near, because the initial production run did not have the lightning protection applied, as it would interfere with testing. That'd be another thing to be added for IOC.
Why are we replacing a platform like the A-10 which is an example of a good dedicated design with a Swiss Army knife approach.
Because the A-10 is an expensive one-trick pony. You call it a "Swiss Army knife", but that's really just because its one trick is very useful. The A-10 only does close air support in an area-denial situation where the most recent anti-aircraft threat was built by the Soviet Union. It takes far more training and maintenance support to operate, and that training and logistics expense is only applicable to that one aircraft.
In comparison, the bulk of the support for an F-35 is shared across the three variants, so the total cost to run the fleet is greatly reduced. A maintainer can switch variants with minimal additional training, and a single base can support any F-35 that stops by. We're also not going to be dealing with Soviet-era defenses for much longer, with China and Russia making gestures that they're willing to sell modern SAMs to anyone who opposes Western interests.
The last major attempts for a "one size fits all" muti-role fighter was the f4 which resulted in the services abandoning the approach in favor of the F18, F-15, and A-10.
...After only 36 years, for the US. The F-4 is still in service in other countries, primarily those that don't need to worry about modern SAMs. The F-4 was originally not a multi-role fighter. It was designed as a fighter-bomber, reworked to be an interceptor, and finally upgraded to do close-air support almost a decade later.
Like a bad penny the multi-role fighter concept just keeps coming back. We are ending up with a plane that does everything and will not be able to do any of it particularly well.
Just well enough to get the job done. What we've learned since the Gulf War is that fighting is expensive and complicated. To support the dozens of different single-role planes, we have to mobilize thousands of support crew to ensure that we can support any kind of mission we need. A multi-role fighter, designed to meet the potential needs, will still be able to handle lesser threats. The F-35 is being built to handle anything China or Russia might produce, but it will be perfectly capable of supporting campaigns in Africa, the Middle East, or North Korea.