Samosa originated in the Middle East and was brought to India following the arrival of Central Asian Muslim kings into the subcontinent roughly 800 years ago. Was it shaped after Egyptian pyramids? We can only speculate. It was called samba or sambusa, and the filling was meat. The earliest reference to it is found 1,000 years ago in Persian literature. Amir Khusro and Ibn Batuta refer to samushak or sanbusa being served 600 years ago in the royal palaces of the Delhi Sultanate.
However, today, for most people, samosa has a potato filling. This was probably an Indian innovation. But potato itself is not an Indian vegetable. The Portuguese brought it to India from South America about 400 years ago. Today, we cannot imagine an Indian dish without potatoes, but this is a recent addition to our diet, just like chillies. We have embraced it so wholeheartedly, that we cannot believe it is of foreign origin.
Many ancient Hindu temples have kitchens and few of them include potato or chillies in the cuisine. Instead they use pumpkin or gourd instead of potato, and long green pepper instead of chillies. This indicates the foreign origin of these ingredients. This is similar to the practice of many Hindu temples not using rose petals for worship of the main deity, as rose came with the Mughals. However, over time, when people forget their foreign origin, these vegetables, spices and flowers are included in rituals, and seen as Indian, worthy of offering to Hindu gods. Thus it is not uncommon nowadays to see deities enshrined in temples adorned with rose petals and the offering including puri-bhaji or even samosa. Chillies are nowadays an integral part of Goddess worship and rituals designed to ward off the evil eye.
Today we see rice as an Indian dish. But is rice Vedic? Rice was first cultivated in China over 7,000 years ago and spread to South Asia and South East Asia. Rice is not mentioned in the Rig Veda, but it is mentioned in the Yajur Veda. The word “yava” and even “dhana” in Rig Veda probably refers to barley that was probably used to make cakes and pancakes that were part of the yagna ceremony. Some have speculated that the word paratha has probably a Vedic origin, from puro-dasha? Did Indians have dishes similar to samosa with vegetable or meat fillings, but in pancake form? We can only speculate. Appearance of rice in the Yajur Veda probably indicates the shift of Vedic civilisation from the Saraswati-Indus valley over 3,000 years ago to the Gangetic plains where rice was grown. Keep in mind though that there is a school of thought (not surprisingly popular with Hindu supremacists) that insists that rice is referred to in the Rig Veda. They point to the fact that rice, both wild and domestic, has been found in the Harappa civilisation’s late period.
Many ingredients and dishes came to India from foreign lands. Likewise, many ingredients and dishes went from India to foreign lands. Sugarcane spread from South Asia to other parts of the world. Jaggery reached Europe in Roman Times as medicine mixed in ghee, not as food. Sugar as we know it reached Europe about 1,000 years ago. Before that, the main sweetener in meals was honey. Indians however took jaggery for granted. And what is now called Chai-tea in Europe and America came from India. The idea of brewing tea in milk is about 100 years old and originated in Indian dhabbas. It would horrify the traditional Chinese who invented tea-drinking, after an Emperor insisted that everyone drink boiled water for health reasons.
I would say that samosa, with its potato filling (or peas filling, for Jains who shun root vegetables), is an Indian innovation based on inputs from Central Asians, Persians, and Portuguese. It is Vedic in the sense of being inclusive, for everything eventually originates from the purusha.