The root cause here is that the environment when grub-install is called is apparently not set up correctly, and grub ends up installed to \EFI\debian on the ESP instead of to \EFI\ubuntu. So grub can't find its config at the expected location (which is built into the grub efi binary), and drops to a grub shell.
The root cause here is that the environment when grub-install is called is apparently not set up correctly, and grub ends up installed to \EFI\debian on the ESP instead of to \EFI\ubuntu. So grub can't find its config at the expected location (which is built into the grub efi binary), and drops to a grub shell.