Spain, in the framework of the European Green Deal, has set ambitious climate and energy goals for 2030. Lignocellulosic biorefineries can make a strong contribution to these goals; however, advanced biofuels generally cannot be produced in a profitable way compared to fossil and first-generation fuels. To address this problem, the efficient production of a wide range of bioproducts, not only biofuels and bioenergy, may be the solution. Therefore, a systematic evaluation of the near-term economic potential bio-building blocks (xylitol, sorbitol, succinic, glutamic, glucaric, levulinic, lactic, and itaconic acids) is presented. Many possible combinations of feedstock and conversion technologies can be considered feasible pathways to manufacture advanced biofuels and bio-based building blocks. To map the optimal groups of technologies in the framework of Spain’s biorefineries, we apply a methodology based on a network optimization approach that combines minimum cost and energy criteria together with feedstock availability and demand constraints. The feedstocks analyzed are pine and eucalyptus residues and olive tree pruning wastes, being three largely available agroforesty residues in Spain. The results show that building blocks show good economic and energy performance compared to advanced transportation biofuels, and although their demand is much lower, they should be considered to improve the profitability of biorefineries. Secondly, advanced gasoline, bioethanol, hydrogen, and building blocks demands can be satisfied with pine, eucalyptus, and olive residues available in Spain. Finally, lactic acid production is profitable, but the remaining routes do not reach the break-even point, suggesting that further research is still needed.