Giant pumpkin growers are split on the benefits of using milk to feed pumpkins. Advocates will actually slit the vine and inject with milk or sugar water. Some will pour a cup of milk at the base of the vine. What they are really doing is adding extra calcium and some micronutrients to increase size.
Any time the vine is slit open there is danger in damaging the plant or introducing disease. Using milk as a fertilizer is OK but other forms of calcium and micronutrients are as effective and the cost is much less. Some growers at the end of the growing season will rub milk on the pumpkin itself. That is to keep the skin soft so that it does not split open. A record breaking pumpkin is automatically disqualified in contests if it shows a crack or split.
As Rita says, pouring milk on your garden won't hurt anything