Wash tomatoes thoroughly and remove cores. For a smoother jam, you can remove the skins by scoring an "X" at the bottom of each tomato, blanching in boiling water for 30 seconds, then immediately plunging into ice water - the skins will slip off easily. Chop tomatoes into ½-inch pieces, collecting all juices.
Heat olive oil in a heavy-bottomed, wide saucepan over medium heat. Add diced onions and cook until translucent, about 5 minutes. Add minced garlic and grated ginger, cooking for another minute until fragrant but not browned.
Add chopped tomatoes with their juices to the pot along with brown sugar, vinegar, salt, red pepper flakes, cumin, and cinnamon. Stir to combine thoroughly, ensuring all sugar granules dissolve into the mixture.
Bring the mixture to a boil, then reduce heat to maintain a gentle simmer. Cook uncovered, stirring occasionally to prevent sticking, for about 1 hour and 15 minutes. As the mixture reduces, stir more frequently to prevent scorching.
Remove from heat and stir in lemon juice. Taste and adjust seasonings if needed – a pinch more salt or an extra squeeze of lemon can brighten all the flavors. The jam has reached the right consistency when it coats the back of a spoon and running your finger through it leaves a clear path.