I didn’t know that D/E subs could stay submerged for long periods of time.
This was always the Achilles heel of D-E submarines since when they came up to snorkel they not only revealed themselves to radar (the snorkel can be picked up) but the whole process was also quite noisy. The necessity of coming up often made the submarines quite vulnerable (although to be honest it was not necessarily such as hindrance - for instance look at the performance of the Argentinian ARA San Luis which managed to not just survive against an entire array of advanced British systems specifically tasked to kill it, but also managed to launch torpedoes and several British ships - with the ironic thing being they did not explode because they had been wired wrongly. Had they been wired right the Falklands war would have taken a very interesting turn of events).
However, with modern D-E submarines, the AIP systems give them a far longer submerged span of time. Take for instance the French MESMA AIP systems (that can be found in the Scorpene submarine) - that gives a submarine over 21 days submerged. That is a lot of time for a submarine to be lurking about in littoral waters, especially considering it could be doing all sorts of nasty things. Or take the German proton-exchange-membrane fuel-cell system. Also around 3 weeks submerged, with absolutely ZERO vibrations, noise or heat.
As mentioned, this is a really bad situation for an opponent. For one the submarine can be able to launch various types of weapons (e.g. the anti-ship cruise missiles, land attack cruise missiles, or in the Israeli case even nuclear-tipped cruise missiles; as well as all sorts of mines including smart ones that can out-think the typical Liberal). However, even (maybe) more importantly, there is also the fact that the opponent has to task much-needed resources towards destroying the furtive submarine (as well as changing its tactics and making the entire mission more difficult since the main fleet has to stay further from the coast, meaning that - say - F/A-18s have to fly off further to attack land targets). This is very similar to what was noticed during the Second World War when the German (or should I say Nazi) navy, the Kriegsmarine, faced off against the Royal Navy. In particular what the mere existence of the Bismarck led to. The Royal Navy had to task a lot of resources simply to ensure that the Bismarck was always kept under surveillance, and whenever it 'disappeared' that would always lead to a huge 'ship hunt.' A similar thing could be seen decades later during the Falklands war when the British had to task an aircraft carrier, 11 destroyers, 5 nuclear submarines, 1 diesel-electric submarine, 25 anti-submarine helicopters and maybe even King Arthur himself to try and find/sink that single Argentinian submarine ...to no avail.
A modern D-E submarine with AIP, good weapons and a crew that can walk and chew gum at the same time is absolutely the worst 'normal' (i.e. non-nuclear, non-WW3) threat available today. They are that dangerous sir. Not invincible (or for that matter, invisible), but in littoral waters they are indeed a potent mix of horrid, and really hard to locate (because even active sonar acts all weird in littoral waters). It is very possible that the moment you know there is a submarine in the vicinity is when your radar picks up a Klub/Sizzler missile transitioning into its supersonic sprint at Mach 2.9 towards your ship. A modern DE submarine may not be invincible nor invisible, but knowing a country has one is definitely a good gallon of really bad news because in training exercises they have a very bad habit of sinking ships without being sunk themselves, and in real war they (e.g. in Argentinian hands, and in Indian hands during a war with Pakistan) also have the same penchant of not cooperating with assets tasked to destroy them. And for a Chinese submarine to surface within a US carrier group and within strike range of a USN carrier does say a lot, and what it says is not necessarily comforting.
They are not a super weapon (nothing is - super weapons only exist in Greek mythology), but it is closer to one than it is to 1940s technology. As mentioned in my other post, even late 1960s technology in Argentinian hands gave the British Navy endless hell in the Falklands, and the only reason British ships were not sunk is because some Argentinian had wired the torpedoes in reverse (it may have been a genuine mistake or something else, but either way it saved British lives because the San Luis did manage to launch torpedoes at ships). Even with the malfunctioning torpedoes, the San Luis still cost British lives because its presence in the area made the British to not execute rescue missions on a couple of helicopters that had gone down in sea.
If (say) the US was to have an 'issue' with (say) Pakistan, Pakistan's fleet of French Agosta submarines would be a nightmare no sane sailor would be happy to face. I believe the USN would do well against them, but there is no way those Agostas wouldn't extract a butcher's bill. Absolutely no way.