Yes, but the pumpkin will sprawl all over the place. So will the cucumber, but it's a smaller vine, and more manageable. If they start going in the wrong direction, I just turn them back the way I want them to go. Put the pumpkin at one end andf the cucumber at the other, or the latter could get smothered. I hope you haven't got anything small growing next to that bed.