Pour the olive oil into a large skillet over medium-high heat. When it shimmers, add the onions. Sauté, using tongs to toss frequently, until soft, 20 to 25 minutes. Reduce the heat to low and cook, stirring occasionally, until the onions are soft, sweet, and lightly browned, 60 to 75 minutes.
While the onions are cooking, transfer the beans to a large pot over medium-high heat. Add enough water to cover by 1 inch. Bring to a boil, then reduce the heat to medium-low, cover, and cook until they are tender, about 15 minutes. Turn off the heat and let the beans sit until the onions are ready.
When the onions are ready, drain the beans, reserving the cooking water, and return them to the pot. Transfer the onions to the pot, along with the tomatoes and garlic. Add just enough of the cooking liquid to barely reach the top of the mixture. Bring to a boil, then reduce to medium-low, cover, and cook, stirring occasionally, until the tomatoes are soft enough to mash with the back of a wooden spoon, 10 to 15 minutes. Stir in the spinach and cook just until it wilts, about 2 minutes.
Stir in the salt, pepper, and lemon juice. Taste and add more salt if needed.
To serve, divide among serving bowls and drizzle with the tahini. Serve with rustic bread.