Due to money neutrality, increases in the supply of money that's in circulation (either because the government is printing money to fund UBI or, to a lesser extent, because they are taxing ultra-rich people, whose wealth generally has a lower velocity than that of the lower-income recipients that save a smaller percentage of their income) do not modify real variables, such as real GDP.
This means that the total supply of goods and services in a country does not change, and the increase in people's disposable income and thus capacity to buy is, on the whole, captured entirely by inflation and rent-seeking. Note that rent alone does not go up by exactly the value of the UBI, but since other goods and services increase in price as well, the total real effect is zero. Of course, many answers have already mentioned that the rent-seeking part can be addressed (at least in part) by Land Value Taxes (LVT).
While LVT seems to me like a good idea on the whole, it still has some serious implementation issues. Firstly, on the federal level, it is almost certainly a non-income direct tax and thus covered by Article I, Section 9, Clause 4 of the Constitution, which requires apportionment among the states (and it's likely not covered by the 16th Amendment, which generates a exemption from this). Secondly, there are other practical problems, such as accurately assessing the value of (unimproved) land separately from whatever is built on top of it. Moreover, most Georgists support a tax rate of below 100%, which would reduce but not eliminate land rent-seeking. There are other arguments that have been brought against LVT, of course, but they don't ultimately seem to hold up, in my view.
Of course, there is also the additional issue that land is not the only area in which sustained economic rent-seeking happens. What makes land easier to tackle in this regard, at least conceptually, is that, in practice, it is almost perfectly inelastic, so taxation of it does not generate productivity-destroying Deadweight Loss the way any other non-Pigouvian taxes do. Other areas in which we have rent-seeking likely do not benefit from the same feature, so taxation would need to be implemented very carefully, so as to generate the roughly estimated the social benefit and thus socially desirable quantity of some area of the economy.
In any case, even though the aggregate real effect of UBI would be approximately zero, this does not mean that there would not be people who benefit. On the contrary, it seems sensible to expect lower-income consumers to benefit the most: for illustrative purposes, an extreme example is someone who starts of with a disposable income of $0. They cannot buy anything at the beginning, but if they receive $2k in UBI, let's say, they can now afford more goods and services than before, even if those goods and services get more expensive. Less extremely, a hypothetical scenario in which each citizen/resident has the same consumption demand curves and receives the same lump sum of money from the government simply results in the value of money decreasing by a factor of total old money+total new moneytotal old money, so the total value stays the same, but it is more evenly distributed (poorer people get richer in real terms and richer people get poorer in real terms).
This doesn't quite match reality because rich people and poor people do have measurable differences in consumption preferences and demand curves. But I think we have good reason to suspect that the overall effects generated by this are small and should not change our conclusion (that UBI generally has a progressive aspect) too much.
The poor in countries where UBI is being considered are not currently starving. So increased spending on food would take the form of buying higher-quality food. The resources for making higher-quality food can also be used for many other goods and services, bought by rich and poor alike. That includes investment goods, bought indirectly by the rich through stock purchases.
UBI could lead to a shift of resources from investment to current consumption, as resources are shifted from the well-off to the poor. This has economic effects, but is not clearly either good or bad. Other things being equal, this would increase interest rates, which is again neither good nor bad of itself.
However, you seem to be assuming the opposite - that UBI would lead to higher investment in stocks (presumably by the middle class?). That would reduce interest rates, not increase them. (I'm referring here to real interest rates, after accounting for inflation. Nominal interest rates could go anywhere, depending on what the central bank decides to do.)
Whether UBI harms the middle class would depend on whether they benefit on net, after accounting for the higher taxes, which could of course be levied in various ways on various groups.
Of course, a sufficiently large UBI would destroy the entire economy, as the incentive to work is destroyed, and any productive activity is heavily taxed to oblivion. But the argument in this post applies to even a small UBI, purporting to show that it would actually make the poor worse off. It wouldn't, unless you hypothesize long-term speculative effects like "changing the culture of poor people to value hard work less", which could exist, but apply to numerous other government programs as much or more.