The diesel-electric Raigei submarine will be based in waters near Japan’s mainland where Chinese and Russian vessels operate.