Cucumbers and Zucchini can be planted next to each other without the risk of cross pollination.
Although Cucumbers and Zucchini are of the same family they're unable to cross pollinate since cucumbers and zucchini are different species of botanical fruits.
So the quality of the cucumbers and zucchini will not be affected by planting zucchini and cucumbers together.