There's a little bit of "spherical cow" involved though. A more detailed model would recognise that R&D spend is not pure investment, and UBI would not be pure consumption.
Whether non-zero UBI today would good policy or not depends on an enormous number of facts about the world that I think it would be very difficult to come to an agreement on.
For example, at what level diminishing returns from R&D spending kick in, and whether UBI apart from increasing immediate welfare has any compounding benefits (human capital, civil cohesion, education, business starts, citizen science) vs mostly benefiting landlords and netflix.
I expect our priors are quite different.
I think there is a pessimistic utilitarian argument for welfare just because people have concave/risk-averse utility functions (of wealth) and it's possible that the dollar-cheap utility gains for people close to zero might outweigh the higher-order costs, but it strikes me as somewhat fantastical to imagine that there might be meaningful financial gains from a welfare scheme, because people with more welfare money might use the money to read a book or start a successful business or something.
For example, a dollar spent on healthcare keeping a chronically sick person alive is a dollar that could instead have improved the welfare of all future generations.
Is there a version of this argument that doesn't throw grandpa under the bus?