Can I flash a custom boot.img to Nexus 5 when "Secure Boot" is enabled?
my custom kernel cannot pass the verification.


This doesn't imply that you cannot boot into the Android with your custom kernel. When the verification would fail, your device would warn you about that and you would be given the choice to continue the boot process or not.

Google mentioned about this here


  RED, indicating the device has failed verification. The bootloader must display a warning to the user before allowing the boot process to continue. 


So now, you can flash the kernel in the same manner those having secure boot disabled would do.