"Long history" emphasizes that something has a long history and deep roots. Its origin can be traced back to a long time ago, and it has a long history and can be passed down forever. This word is usually used to describe the details of a culture, scholarship, tradition or history.
"A long history" emphasizes that the source of a thing is far away, and the river flows from the source to the present. Its meaning includes the meaning of a long history, but it emphasizes the long origin. This term is usually used to describe the development process of natural resources or geographical environment, such as a long river and a high mountain.
Therefore, there are some semantic differences between "a long history" and "a long history", but both of them show that the source of things is remote and accumulated over time, which has important historical and cultural value.