Sure, why not. But you have to surface to launch it...and it probably has the effect of about one hit from a 8" shell with a range that puts the sub in visible range of the BB. Doesn't sound like a good idea from the sub's perspective. The best iteration of that is the IJN SS5 with torpedo-bombers.
What we should have is a new type-3 bomber; a fighter-bomber with rockets...fast and deadly to surface ships.
Nose camera from a UK Mosquito attacking a ship with 8 rockets.
Fighter planes should also be able to strafe ships; make them come down low but increase AAW the lower and closer they get..to counter it.