Ubuntu 18.04 on Mac Mini mid-2007

The GRUB image on the Ubuntu ISO is EFI64 only. You need to create an ia32 installation of GRUB on that boot disk to be able to boot in EFI mode. Thankfully, Fedora and Debian ISOs include the needed binaries, so you can copy bootia32.efi and /boot/grub/i386-efi from them. Once installation is complete, there is no more tinkering required with the installation: the required GRUB files are automatically added by the installer.

Follow this answer here, but use the disk image hosted over here instead of the broken link. You don't have Secure Boot, so you can ignore that step. You should also use GNOME Disks to change the partition type to EFI System Partition, and create a GPT partition table rather than MBR.

Alternatively, whilst your Mac can only load EFI32 images, its legacy BIOS emulation mode will load 64-bit bootloaders. Therefore, you can try and remove the EFI boot partition to trigger it to read the disk as a BIOS boot mode disk, or select the 'Windows', rather than the ‘EFI boot’ option from the boot device selection menu if it is offered.