To have a plant with realistic characteristics, I would think about two things: how it produces the oil and why it does so in the first place.
Without going deep into chemistry, let's just state that plants need a lot of energy for oil synthesis. Most oil-industry crops that come to my mind are tropical or subtropical ones - soya, coconut and oil palms, peanuts, even that diesel tree. In more temperate climates, it is not very "economic" for plants to produce much oil. So the plant needs a potent source of energy, mainly light.
In a fantasy setting, the source can be magic. Magic gives you complete creative freedom and you can create any plants you want. But crystals that can support the production of oil would be an amazing magic source and goblins with potent magic in possession are a problem on its own. Also not very science based.
If your goblins live deep underground, then I would create a volcano nearby. A magma river can create an unlimited supply of heat and light for your plants. It also solves the why question. There would be volcanic ash and flying hot cinders from time to time. The plants could develop an oily surface layer to protect themselves. Their oil-covered leaves would then be harvested.
If your goblins live close to the ground, then surface plants are an option, too, even if the goblins themselves live down below. In arid climates, trees can have roots as long as 50 meters. Extremely long lived trees could make energy supplies by synthesizing oil deep underground in their root system. These roots would then be harvested. (Depending on the size of the forest and your goblin culture, there could be a risk of depleting the oil supply, though.)