Interfacing GPIO 3.3V to 74HC04 5V
A 74HC04 is not guaranteed to function correctly if driven from a 3.3V CMOS output (although it will almost certainly work as it is very unlikely the device will be at the data sheet limits).

The worst case Voltage required to be recognized as a high level is 70% of the supply voltage (Vih). If the 5V rail is in fact 5.25V then this would be 3.675V - above the 3.3V supplied by the GPIO. The more normal case is that it would sense just over ~50% as a high which for a 5V rail is 2.5V and so would work.

The HCT family of devices is a similar to the HC devices but are designed for this type of interfacing and have a threshold that is independent of the supply rail with a worst case of 2V which is guaranteed to work with the 3.3V input signal. They do have a more restrictive supply rail voltage of 4.5 - 5.5V though.

The 74HCT04 device is equivalent to the 74HC04 but has this better controlled threshold.

The HCT devices were actually designed to interface to bipolar TTL devices which had a worst case Voh of 2.4V but will work as well for your application.