Preheat the oven to 350 degrees. In a heavy gauge pot, combine the shallots, balsamic vinegar, sugar and port wine, bring to a simmer, and cook until dry. In a large bowl, combine the grated potatoes (remove excess water), salt, white pepper, thyme, and the extra virgin olive oil and mix until fully combined. In a greased baking pan (9x13), spread half of the potato mixture evenly. Pour the shallot jam on top and spread evenly. Finish with the remaining half of the potato mixture and cover completely. Place uncovered in the oven for approximately 90 minutes. Remove and let the cake rest for 15 minutes before slicing.