Neural net without hidden layers should be a simple linear model: why do I get so different results?
I would say your way of comparing this is rather incorrect. There are two main problem from what you did those are :


R linear model (lm) is solved using deterministic solution whereas
keras model optimized with gradient descent. In the end you expect
the weights and result to be close but not similar. For OLS, it
attains the lowest theoretical training error(by definition)
averaged over all training sample. Your keras model will converge
towards this minima but it might have difficulty converging to
similar minima(due to the nature of GD).
you are not training your keras model with full data. Notice you put
validation split to be 0.2 i.e. you are training with 80 percent of
your data.


Finally, if you want to test whether single layer NN is similar to OLS You can try setting validation split to 0 (or simply don't declare it) and training it with the whole dataset as your batch.