Every KM ship larger than a Light Cruiser was a waste. The KM needs subs, lots of them, from the first day of the war.
The problem is that a much larger investment in U boats pre war just makes the Brits panic more so then OTL and invest much heavier in ASW assets prewar.
Once the war starts then yeah continuing to build heavy cruisers and BB's is a huge mistake.
Though I also think the Germans would have been smarter to more thoroughly plan out the usage of Armed Commerce Cruisers/ auxiliary cruisers in the early war. The Germans used 10 in the early period and wasted a lot of time in the very early war when the Allies weren't using convoying at all. Even with those small number of vessels and late start the German AMC's wracked up a phenomenal kill total of something like a million tons of Allied shipping. If the Germans had more thoroughly covertly planned for using AMC's prewar they might have had a even larger effect. Obviously making preparations for hundreds of them is going to set off alarms and provoke an early response. But if the Germans had made preparations to outfit say 20 or 30 suitable vessels to be outfitted in the last days of peace to be used almost immediately after the outbreak of war. Before the Brits can really set up their blockade surge these vessels to sea and then have them scatter across the globe wreaking havoc.
The vessels should have the following characteristics.
1) At least 5,000 tonnage weight (smaller vessels could be used for shorter range operations say in the North Sea before the Brits begin convoying).
2) Able to be modified to carry a catapult and facilities to launch, operate, and maintain a small float plane (Probably a Arado-196) for recon.
3) Very long range with large amounts of storage room for food, spare parts, ammo, POWs, and the like.
4) Be able to mount say half a dozen old cruiser guns. Further armament of several similar caliber AA guns, a large number of machine guns and auto cannon, a couple torpedo tubes for close range dispatch of captured vessels.
5) A small marine complement to do boarding and scuttling operations.
6) The ability to have aspects of the ship at least superficially rapidly changed to disguise their identity.
7) The ability to refuel other AMCs or U-boats at sea. If possible the ability to pump fuel out of captured vessels to prolong the AMC's range.
8) Light armor over critical sections (not enough to stop a six or eight inch shell but hopefully prevent a 20mm auto cannon from ripping the ship apart.
It's obviously not going to be enough to make the Germans win the war but it would be very costly for the Allies and force the allies to beef up their coastal artillery and protection forces around the globe draining their strength. Also would force the RN to at least temporarily divert large numbers of naval vessels and aircraft around the world and do expensive convoying across the globe.