It's impossible for Cucumbers and Zucchini to cross pollinate since Cucumbers and Zucchini are a different species even though they're of the same family of botanical fruits.
You can safely plant both cucumbers and zucchini close to each other without risk of cross pollination and without risk of decreasing the quality of the cucumbers and zucchini plants.
They're of the same family of the gourd but not the same species so that means they cannot cross pollinate since the plants have to be of the same species to cross pollinate.